• 0
Sign in to follow this  
Followers 0

Fine-tuning Widget Appearance

Question

Posted · Report post

I am having some issues getting widgets to appear on just the Blog page of our site (and all blog post pages). I have used the Widget Logic plugin with great success throughout the site (thanks to the suggestion from @rangelone). But for some reason it does not work with Blog pages. I am stumped. Hence I am wondering if anyone has thought of a workaround to the issue. :-)

Share this post


Link to post
Share on other sites

4 answers to this question

  • 0

Posted · Report post

I haven't used widget logic myself so i'm not sure how you target page types/templates. Can you paste an example of the code you've used that works?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

(@simple_mama) Hi Jenny: Widget logic works like this: http://cl.ly/2Y133U2S3C2R2m262N18 to allow a widget to appear on a single page and like this: http://cl.ly/421s0R2H070u1Q0V2l3z for multiple pages. The logic simply does not work on the Blog page (which uses the same template as a number of other pages - BTW). I am thinking that @pross (Simon) would know why as I think there is something a bit different about a Blog page.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Assuming your read the widget logic docs, where the 3rd line of the description leads to the wordpress conditional codex page: http://codex.wordpress.org/Conditional_Tags . Where all the template conditions are listed, and your looking for the 1st one, is_home().

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks @pross (Simon). I can always count on you when it comes to PHP! I had read the doc and simply didn't think the Blog page was any different then a WP page. I know better now! As I have the blog and posts pages that I want to show particular widgets on, I need to have 2 conditional tags. So I figured I'd post what I used in case others have the same issue: [code]is_single() || is_home()[/code] Use this in the Widget Logic option box on the widget in question: Using Widget Logic, this will get a widget to appear on [i][b]only[/b][/i] your main Blog page and each Single Posts page.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0