Keep sidebar when search results no posts.
-
Hi there
I’m using Custom Sidebars on a custom post_type and everything works fine. The problem is that when I also modify the query (to limit posts with given meta_query etc.) and it returns no posts, the plugin will fallback to the default sidebar, because get_post_type() returns null
Please add a filter / action to allow for forcing the sidebar to show up even in those cases by beeing able to override
$post_type = get_post_type();
in inc/class-custom-sidebars-replacer:317
If you wish I can get a PR going for this if you agree with the idea.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Keep sidebar when search results no posts.’ is closed to new replies.