ThemeShaper Forums » Thematic


Filter sidebar (widget area) content

(2 posts)
  • Started 9 years ago by johan
  • Latest reply from Devin
  • This topic is not resolved
  1. johan


    Thanks for a great theme. I'm using thematic, and customizing it from a child theme.

    I wonder if there is way to filter certain widget areas in general, and specifically the "primary aside" area. I want to be able to filter whatever is there in the same way as using "the_content" filter or other, preferably without altering core code, but to do it all from functions.php. I can't find a hook like this.

    The context is that I have a sidebar widget in primary aside that shows related link, depending on the contents of the post or the page. Sometimes it shows a list of links, sometimes it is empty, depending on what's in the article. If it's empty, I want to hide primary aside, but since it's dynamic, I have to execute the widget code first to see what shows up, I can't hide/show it statically, and I don't want to replicate the widget code in functions.php. So, the widget shows nothing, but the empty div and ul.xoxo is still showing, and I want it gone.

    The only way I've found to solve this is to add a javascript that hides it from the client, which I wish to avoid, because I don't want to add a bunch of unecessary javascript, and also I get a flash of the widget area on screen before the javascript kicks in and hides it.

    I'm thinking maybe I'm just complicating this and there is an easy solution. If not, Is there a way to wish for widget area filters in future versions of thematic?

    Posted 9 years ago #
  2. Take a look at:

    There's also the hook thematic_abovemainasides() where you could call the widget function.

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.