Forums

Hiding sidebar on pages. (8 posts)

  1. rla128
    Member
    Posted 6 years ago #

    http://www.amandamarie.info/

    I want to completely hide the sidebar for all of the pages (that is, everything but the "blog" section, or the posts, of this website). I hopefully would like to include the background color of the sidebar as well, that is make the rap image dependent on it being a post.

    How exactly do I use the is_page() test in the sidebar.php file to do this?

  2. rla128
    Member
    Posted 6 years ago #

    Any help?

  3. moshu
    Member
    Posted 6 years ago #

    Just delete/comment out the call for the sidebar in the page template.

  4. rla128
    Member
    Posted 6 years ago #

    I want it to show up in everything else though, buddy... actually, I want to be able to edit what exactly shows up on what pages.

    Wish it was that simple.

  5. moshu
    Member
    Posted 6 years ago #

    Well, if you can explain what you'd like maybe it will become simple.
    When you said "pages" I thought about Pages cretaed by WP. Was I wrong? Pages are using the page.php template, posts and archive views are using different templates. Believe me, I made that theme :)

  6. rla128
    Member
    Posted 6 years ago #

    I do suppose I could do that if I wanted to get rid of the sidbar altogether. Along those lines, can I get rid of the background image on those pages, too?

    I suppose I'm also asking how to use conditions to make only certain parts of the sidebar appear for certain pages.

  7. moshu
    Member
    Posted 6 years ago #

    Hmmm.
    To get rid of the (brown) bg image of the sidebar for Pages - you will have to save the single.php as page.php and edit it accordingly.

    Otherwise you can use Conditional_Tags to display selectively stuff, e.g.
    if (is_page('32')) --> show this

  8. rla128
    Member
    Posted 6 years ago #

    Yeah, I couldn't figure out how to get the conditional stuff to work... not too much actual knowledge of the rules of php...

    I was sort of hoping for some generalized help on that.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.