ThemeShaper Forums » Thematic


which hook should i use to get an alternate sidebar?

(5 posts)
  • Started 12 years ago by snack
  • Latest reply from Chris
  • This topic is resolved
  1. snack

    hi. i want to call an alternate sidebar2.php for my blog. i'd like to do it from functions php. am i on the right track? what should i use?


    Posted 12 years ago #
  2. snack

    rephrasing question: what's the correct way to conditionalize the actions of thematic_sidebar() in my functions.php? do i remove it's current actions, and then add my own or what?

    by conditionalize, i mean i want different actions for diff pages.

    and what the heck's the diff between and 'action hook' and a 'filter hook'?


    Posted 12 years ago #
  3. snack

    i'm talking to myself, but it's still nice to have answers, so for the next guy here you go!

    function conditional_sidebar() {
    	if (is_page()) {
    		// return FALSE for no sidebar
    		return TRUE;
    	} else {
    	// see get_sidebar in codex fmi
    add_filter('thematic_sidebar', 'conditional_sidebar');

    yay! next...

    Posted 12 years ago #
  4. shanoboy

    Ha, Thanks for following up with yourself. I used this!

    I want to do the same thing you are, only I'd still like to be able to use widgets. I don't see how you can if you are going to have a bunch of sidebars, unless you create new widget areas... which I have no idea how to do.

    Posted 11 years ago #
  5. Hi,

    you could use Kaspars' Widget Context plugin.

    Or you could use the latest SVN copy of Thematic plus the new functionality: Something new 'bout widgetized areas


    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.