• I have set a widget to show on posts in the ‘Health’ category. The widget displays on the category archive page, but not on the posts themselves. How can I get the widget to display on the posts in the ‘Health’ category as well as on the category archive page, please? I have provided some examples below:

    Here’s a screenshot of my settings for the widget instance:
    Screenshot

    Here’s a link to the ‘Health’ category archive (the Health4Men Q&A widget in the right sidebar is the one I need displaying on the post pages for posts in the ‘Health’ category:
    Archive Page

    And here’s a link to the post page for an article in the ‘Health’ category, not showing the widget:
    Post Page

    Thank you!

    http://wordpress.org/plugins/conditional-widgets/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m trying to narrow down the problem, but can’t replicate. Can you please try one or more of the following for me:

    Enable WP_DEBUG and see what shows where the widget should be showing.

    Un-check all those ‘special page options’ at the bottom, and let me know if that makes it show. If so, enable them one by one until it’s hidden again, and let me know which one did it?

    Thanks

    Thread Starter Zefrem23

    (@zefrem23)

    Enabling WP_DEBUG results in this :

    [Widget hidden because this category doesn't match ones we were told to show on.]

    Unfortunately, turning off all the special page options at the bottom didn’t make it begin showing the widget on the category’s post pages 🙁

    Hopefully the debug message might provide some sort of clue?

    If you switch to a Default Theme (twentytwen, twentyeleven, twentytwelve, etc), does the problem persist? I’ve taken a look at the code and tried multiple ways to reproduce this issue, but I can’t.

    Thread Starter Zefrem23

    (@zefrem23)

    I’ll need to make a copy of the installation to change the theme, as I don’t want to risk destabilizing the live site. Once that’s done, I’ll make the theme switch and let you know if this oddness persists.

    Thanks for your help so far! 🙂

    I had another thought last night that could easily be the source of your problem. It’s likely that another widget is messing with the data that needs to be used to properly evaluate what category we’re on.

    Try moving this widget to the very top of your sidebar so that it gets processed before the others – does THAT change when/where it is displayed?

    Basically, in your situation, when Conditional Widgets asks WordPress “what category are we in?” WordPress is giving the wrong result. This is likely caused by some other code (plugin, theme, etc) mucking with the query and not restoring the original data properly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Individual posts in category not showing widget’ is closed to new replies.