Showing posts with label wordpress. Show all posts
Showing posts with label wordpress. Show all posts

Sunday, January 29, 2017

How to Remove the Sidebar Menu in the Wordpress Verbosa Theme

I love the Verbosa theme. It's very flexible and looks great no matter what device the visitor is using.

One thing I don't like, however, is the inability to remove the menu from the aide bar. Sure, you can create a custom menu, amke it empty, and assign it, but that still leaves the MENU header there.

I tried using CSS to set it to display:none, but no go. Dunno why.....

Ultimately, I ended up commenting out the function that calls the menu.

The function is called in the file:

content-- themes--verbosa--includes--core.php

Look around line 150+ for this section:



And comment it out.

No more menu.

Remember that whenever you update the theme, you'll have to go back in and comment it out again.


Friday, June 26, 2009

Turn Off Comment Section in WordPress Pages

I'm setting up a WordPress install with the primary intent of using it mainly as a content management system (CMS). I'm tinkering because a family member has started up a business and is looking for a web site. I want to give them something robust enough to meet their needs, yet simply enough that they don't have to call me every time they want to update or add something.

WordPress is cake to install, so I had an instance running in less than 10 minutes. I edited the included About page that comes with the default install, turned off Allow Comments and Allow Pings, then viewed the page. At the bottom of the page it was still tacking on the comments section:


Ug. I poked around and couldn't figure out how to turn it off, so I resorted to a handy-dandy Internet search and found the solution.

In your theme, you will have a page named single.php, or index.php. Use the editor to view the source code for the page. In the code, the comments template is called with:
<?php comments_template(); // Get wp-comments.php template ?>

Comment that code out:

<!--<?php comments_template(); // Get wp-comments.php template ?>-->

and add this:

<?
php if(is_page(array(27,32,56))){
//do nothing
}
else{
comments_template();
}
?>

Where the comma separated numbers correspond to the page_id.

The comment section will still show up on blog posts, but not on any of the pages you identify in the above code.