Support » Themes and Templates » hide menu when viewing a post

  • Hi,
    I am looking for a way to hide the menu-block when a user views one of the posts. I only want to display the menu on the main page.
    I would like to do this using just css, but I can’t find a way to do that.
    thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • I do this same thing on my NucleusCMS-based weblog, and am glad to se this particular workaround. In NucleusCMS, there is a template system which can be used to create different presentation based upon location within the weblog, i.e.: reading main page or reading a single entry.
    (No, I’m not suggesting WP should go the template route! It’s fine the way it is.)
    BTW: Where can I find a list of the variables WordPress uses, e.g.: $single? This could come in handy to personalize the weblog. I would much rather modify the index.php file than change the core WP code.

    If you’re going to code the PHP, you might as well do something as follows:
    if ($single==1) {
    //insert menu code here

    The CSS method is inefficient because it makes all those function calls, including all those MySQL queries, for no effective result. For a low traffic site this may not matter, but it’s a sure way to hog system resources unnecessarily.

    Individual entry look/template is a popular request and I hope WP developers will address this directly or through a plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘hide menu when viewing a post’ is closed to new replies.