ThemeShaper Forums » Thematic

Different sidebar content for different pages

(5 posts)
  • Started 5 years ago by elshaddai
  • Latest reply from curobs
  • This topic is resolved
  1. I'm implementing a page-driven site using a child theme of Thematic 0.9 and need to display different sidebar content depending on the page that's being viewed. I've successfully accomplished this by copying the sidebar.php file into the child theme and adding a series of 'if/elseif/else' statements in the '#primary' and '#secondary' sections that parse the page slugs.

    Is a manual child template file the best way to accomplish this result? Or is there a way to change the contents of '#primary' and '#secondary' in the child functions.php file? Or should I try using if/elseif/else in the page template to serve up different versions of sidebar.php, e.g. sidebar1.php, sidebar2.php, etc.?

    Curious to get thoughts on what a "best approach" might be... Thanks!

    Posted 5 years ago #
  2. Have you tried Widget Logic?

    Cheers,

    Chris

    Posted 5 years ago #
  3. Here's another one: Widget Context Plugin — Konstruktors Notes

    Posted 5 years ago #
  4. Thanks for the links - Widget Logic worked very nicely for all but one item, which included some template tags, but I was able to use the 'abovemainaside' hook for that. Thank you again!

    Posted 5 years ago #
  5. curobs
    Member


    Posted 4 years ago #

RSS feed for this topic

Reply

You must log in to post.