Propaganda Party: The Pop Stalin Design Manifesto

 

14 People Have Bloviated

  1. David Airey :: Graphic Designer | Jul 23

    Hi Jen,

    Hope all’s well with you lately. I didn’t know this simple piece of code either, but no doubt it’ll come in useful. Thanks for writing about it!

  2. Pop Stalin | Jul 23

    David- All is well. It’s one of those pieces of code that make you smack your head when you find it. :)

  3. David Airey :: Graphic Designer » Creative resources 26 July 2007 | Jul 26

    [...] Jen at Pop Stalin teaches us the code to create different sidebar content on various pages of your WordPress blog. If you use Wordpress as a CMS (which I encourage anyone to do) these are the steps for having multiple sidebar content in one sidebar page (sidebar.php). [...]

  4. Fred | Jul 26

    I used Wordpress a while ago, but found it very confusing and not that easy to configure. I’ll try again later…

  5. beth | Aug 6

    This will be a nice way to consolidate my sidebar files, thanks!

  6. Jeff | Aug 26

    Thanks for this. I recently added the top commentators plugin and want to display it only on the homepage but can’t seem to get this to work. I added it just as you have it.

    Is there something else that needs to be added inside the sidebar file that makes this work?

    Does this have to be there:

  7. jameswillisisthebest | Sep 8

    This is my first post
    just saying HI

  8. mike | Oct 13

    hi i tried this but it it didn’t work as planned. can you show me how that code works in the context of the rest of your sidebar? thanks!

  9. Pop Stalin | Oct 25

    Mike-
    I’m not real sure what you’re asking (sorry it took so long to reply) but below is sort of a working example. I don’t want to include all the content that I used for my client so I hope this makes sense to you.

    One thing you need to make sure of is that there are no spaces in the final code.

    1. < ! -- SIDEBAR ABOUT PAGE -- >
    2. < ?php if (is_page(about)) { ?>
    3. < h2 >Some Title< /h2 >
    4. < p >Some text< /p >
    5. < ?php } ?>
    6. < ! -- SIDEBAR BLOG -- >
    7. < ?php if (is_home()) { ?>
    8. < p >Some intro text< /p >
    9. < br / >
    10. < ?php include (TEMPLATEPATH . '/searchform.php'); ?>
    11. < ! -- BLOG ROLL -- >
    12. < ul >
    13. < ?php wp_list_bookmarks('categorize=1&category=2&before=<li>&after=&show_images=0&show_description=0&orderby=name'); ?>
    14. < /ul >
    15. < ?php } ?>
  10. Large balloon guy | Mar 16

    I am looking for a plugin that allows you to write content for the sidebar on that specific page. know any?

  11. Jen | Mar 17

    I don’t know of any specifically designed to do that. If it were something that I’d need for a site I was designing I’d probably look into using custom fields.

  12. dirtyharris | Jul 29

    how about i want my sidebars to change contents every time i visit a category– the sidebar will contain all the posts from the category that i selected? any idea?

  13. Jen | Jul 30

    @dirtyharris:
    Yes, you would use Conditional Tags. Check out this link:
    http://codex.wordpress.org/Conditional_Tags
    then scroll down to the section “Variable Sidebar Content.”

  14. zacheos | Sep 9

    Some people use a hierarchy method in the naming of the template files to achieve multiple WordPress sidebars, but in my opinion it is too cumbersome for most user’s needs. The method of multiple sidebars for WordPress that I use involves only a very simple PHP snippet added to the template to call the desired sidebar file depending on the area of the site that you are in.