WordPress.org

Ready to get started?Download WordPress

Forums

hide menu when viewing a post (4 posts)

  1. pvanovert
    Member
    Posted 10 years ago #

    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
    Paul

  2. randybrown
    Member
    Posted 10 years ago #

    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.
    Thanks.
    <rb>

  3. Anonymous
    Unregistered
    Posted 10 years ago #

    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.

  4. nsxpower
    Member
    Posted 10 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.