• Resolved jeffrod

    (@jeffrod)


    I am using DW in concert with Flexible Posts to populate my right-hand side bar with a custom post type, Promos. Each section will have its own unique set of promos (this is where DW comes in).

    So, in the “About” section, I have one FP widget to display all the about promos. In the “Kids” section, I have another FP widget to display all the kids promos, Teens section => teen promos, etc…

    DW works great on all those other pages. However, in my News section, all of the promos for all of the other sections appear on my sidebar. In other words, even though DW is set to show each FP widget in its own section, DW is still rendering the FP widgets in the News section without regard to the settings that I have entered on each widget’s page.

    I created a bunch of screenshots for review. It includes screenshots of each section and also the news page, with all of the extra widgets that shouldnt be there. I also included screenshots of the DW settings page for each of the three widgets.
    https://drive.google.com/folderview?id=0B_yf7ynz_2nbbGwyUnpaS0REWmc&usp=sharing

    I am using:
    WP 3.9.1
    DW 1.5.9
    WooThemes’ Canvas as base theme
    Custom built sub-theme

    https://www.ads-software.com/plugins/dynamic-widgets/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Qurl

    (@qurl)

    Most common reason for this kind of problems is that the theme is not releasing any or at least not the correct values to DW.

    Many times the theme reports for an archive page, esp. custom post types “page” instead of “archive”. DW does try to fix this when it detects it’s actually an archive page, but doesn’t always succeed unfortunately.

    Thread Starter jeffrod

    (@jeffrod)

    Thanks for the quick response. Even if it was reported on a page, it seems odd that they would be rendered on the archive since DW should be checking if it is on the section page or below – and the archive is not in any of those sections. At least In my mind, the values being reported shouldn’t matter at all in this case… but obviously if I knew better, I wouldn’t be asking this question!

    I’m somewhat new to WP theme development but I dont mind hacking the Canvas base theme if I have to. Can you point me in the right direction to make the theme report the proper value?

    Plugin Contributor Qurl

    (@qurl)

    Unfortunately it works a bit different. This is the way WP works. For the admin side DW gets it’s values from the appropriate WP functions. On the (front-end) theme side, DW relies heavily on what the theme is reporting cause the theme runs the show there and DW can do it’s magic.

    There is a hidden option in DW that can help you, but beware for a lot of technical data. Also do this only when you do have (some) PHP coding experience. I’m not responsible for any damage. You can set DW into DEBUG mode by changing ./wp-content/plugins/dynamic-widgets/dynamic-widgets.php the constant DW_DEBUG from FALSE to TRUE.

    With DW_DEBUG set to TRUE, visit the page that goes wrong. Look into the source. DW has written a lot of comments there. One of those comments is what page DW has detected (Where Am I).

    Thread Starter jeffrod

    (@jeffrod)

    I’m not afraid of a little debugging and PHP code! ??

    It looks like WhoAmI = 'front-page' because $wp_query->is_home = true. That is definitely wrong so I guess I have to dig a little deeper but it doesn’t seem like this is a DW issue like you suspected. Thanks for the direction. If it looks like it comes around full circle and becomes a DW issue, I’ll post back here. Otherwise, thanks for the help.

    Thread Starter jeffrod

    (@jeffrod)

    Actually, I guess is_home is supposed to be true.

    Anyway, after digging around the source code of DW and WP I was able to figure out the right settings for DW. I must admit, I wasn’t expecting everything to be triggered to ON/YES by default. But I guess that is inline with the default WordPress widget behavior.

    Still, once a widget is set to dynamic, it seems to make more sense to me to whitelist all the places the widget should appear rather than blacklist them. I know theres the “Set all options to NO” field so it can be done either way. I just got a little confused is all and now I’m rambling.

    Thanks again for your help and attention. I have what I need.

    Plugin Contributor Qurl

    (@qurl)

    Good to read you got it working!

    I can imagine you get confused. More DW users have reported that. Unfortunately I haven’t found a better way to describe what happens when you set a default to YES or NO.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘All filters appear to be ignored on archive page’ is closed to new replies.