• Hi
    I’ve been searching all over the place but I can’t seem to find an answer for my question anywhere.

    My question is: How do I get a different sidebar for my “Pages”?

    There is one for the frontpage, which starts here: <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>

    How do I make something like: <?php /* If this is the pages */…. ?> ??

    For instance. In http://www.bojko.dk/notes/, I want the sidebar to display <?php wp_list_pages(‘exclude=17,38&title_li=<h2>’ . __(‘Pages’) . ‘</h2>’ ); ?> …

    Any ideas, or links I might have overseen?

Viewing 9 replies - 1 through 9 (of 9 total)
  • if(is_page())

    Thread Starter Ulrich

    (@ulrich)

    Ahhh Thats how the thingy works.. 🙂

    Tanks for the quick response.

    I’m thinking I have the opposite problem here because I want the same sidebar.

    I’ve created two pages. Each has a sidebar, but at the bottom of it where I usually have images to BlogRoll, BlogLines, etc. only the alt text for those images shows up.

    My sidebar.php has everything in there, but for some reason the images are showing in that section.

    I have the similar or the same kind of question.

    In some template directory, there’s a file called “sidebar.php” that controls how the sidebar is appeared on WordPress. In my current template, “page.php” is not contained (instead, it uses default template to for the pages).

    Anyway, since, using the template tags, won’t enable ‘expanding css menu style’, I want to create another “sidebar.php” and associate it with a new “page.php” to show different types of menus on top page and inner pages.

    Can anyone solve this problem?

    test

    Sorry for the double post here, but for some reason what I wanted to type in wasn’t accepted. Something about a precondition being false. I’ll try again.

    Concerning the problem I outlined, I have more to report. I figured out that I wasn’t telling the page to go high enough in the directory structure to find the image I was telling it to find.

    The images for this section of my sidebar are located in wp-images, which of course is in my root blog directory.

    When I entered the entire path it and the rest of the images showed up just by editing that one path, not the others. Weird.

    As a test, I also put one of the images in the images directory in my default theme folder. Worked there, too. But of course, if I put that in there, it’s going to cause trouble for when/if I switch to another theme.

    So, how do I call the image correctly without having to type in the full path? I tried dot dot slash, dot dot slash, dot do t slash wp-images/bloglines.gif, and variations of it, but none worked. Those double dots and slashes always mess me up. 🙁

    Thoughts anyone?

    bump

    Why don’t you specify the paths to the images in full, without using relative paths?

    With rewrite rules, the URLs of the page changes, depending on the particular page/post/archive-page you are at, which is why it shows sometimes, and doesn’t on other occasions.

    Why don’t you specify the paths to the images in full, without using relative paths?

    I guess I’ve always given relative paths a higher rating compared to absolute paths. Now that I understand a bit more of the innerworkings of these pages, I’ll override that thinking.

    Thanks for explaining it 2fargon, er, I mean carthik. 🙂

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘different sidebar for pages’ is closed to new replies.