• How do I hide the sidebar on certain pages to make the page wider. I have top navigation, so that is not an issue. I know how to use page numers or names and know it involves conditional, but can’t find where to add code or what specific code is needed.

Viewing 10 replies - 1 through 10 (of 10 total)
  • after searching for the same answer myself i decided to make my own code.
    im not good at making plugins but if you or anyone still wants this question answered there is a php edit that does the same thing.

    by changhing the inforation in the url you can set it to hide the sidebar (or othr things)

    give me an email to help (AT} blackfiredesigns {dot] com [Email Moderated you’ll thank us later] if yo want me to make the edits for you.

    Seems to me like your reinventing the wheel. This already exists. Conditional tags.

    fair enough, i’ll keep my help to myself.

    I cannot find the conditional tags to hide the entire sidebar. Just tags to display a custom heading while on a specific page.

    I have a page template especially for my wanted page. But it has no get sidebar tag to exclude. Nor have I managed to do it with CSS.

    Please someone point me in the right direction here. I’m assuming that I need to put the exclusion code in the sidebar and not in the blank page template?

    If my blank page had a get sidebar tag in it, I could just make a template from it and exclude that command, but my call to get the sidebar is in the footer. Moving it results in no sidebar in any page.

    It doesn’t matter where the call for the sidebar.php is.

    You have somewhere this:
    <?php get_sidebar(); ?>

    Put the conditional tag(s) around it:
    if is_page(43)
    get_sidebar
    elseif is_page(123)
    show something else
    else
    do nothing

    It is all there on the Codex page linked by jeremyclarck13.

    Seems like I found it here: http://wordpress.org/support/topic/108518?replies=6

    Hopefully I will be able to exclude more than one page this way too.

    moshu, you posted while I was writing my post. Thank you! My problem was also that I cannot write out the full lines of code and make them work since I don’t know enough PHP yet. But the page I linked to had the full deal written out.

    The way I have it now is the other way around. Unless the page is page no. 208, get the sidebar.

    Thank you for answering!

    Good. The most important thing is that it works as you wanted.

    Wouldn’t it be easier to apply a page template rather then opening up a file and editing it when ever you want a wide page?

    develop and style a wide page once and just choose it from the page template drop down when making a page when you’re making the page sounds a lot easier to me. What would be the downside?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Hide sidebar on certain pages’ is closed to new replies.