• Doing a dynamic_sidebar( $id ) gets replaced with custom sidebars. However, doing a check with a replaced sidebar with is_active_sidebar( $id ) doesn’t work at all.

    I checked the source, it doesn’t have any provision for this.

    Personally, I find this quite important and should be part of the normal behavior of the plugin. Since a call to dynamic_sidebar usually has an is_active_sidebar prior to it.

    https://www.ads-software.com/plugins/custom-sidebars/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Benjamin Intal

    (@bfintal)

    Alright I just made my own fix for it. See this Gist: https://gist.github.com/bfintal/5b565eb32e8472e755a9

    is_active_sidebar now works as expected for custom sidebars ??

    Hi @bfintal,

    Thanks for mentioning this and especially for providing the helpful and illustrative snippet! We’ve gotten the details over the developers for further consideration. We’ll post back here with any updates on that. ??

    Thanks once again!
    David

    Thread Starter Benjamin Intal

    (@bfintal)

    Awesome @david,

    The code I shared is what I’m using right now and it’s placed inside the theme. It could definitely be shorter if it’s inside the CustomSidebarsReplacer class

    Hi @bfintal,

    We have notified the plugin developer about this and he’ll use the provided code by changing it appropriately or redevelop the code if required.

    Thanks for sharing the solution here, your help is really appreciated ??

    Have a fantastic day!

    Cheers,
    Vinod Dalvi

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘`is_active_sidebar` not reflecting new sidebar’ is closed to new replies.