Widget shows on search page
-
First of all, great plugin – love it!
Second of all, the widget shows up on search results pages if a post type for which the widget is checked to show is in the results.
What’s great is that your code even has a comment with the solution in it ?? Check line 35 of the main PHP file:
if(!is_archive() && !is_front_page() && in_array(get_post_type(get_the_ID()), $conditionals_post_list))
should be:
if(is_singular() && !is_front_page() && in_array(get_post_type(get_the_ID()), $conditionals_post_list))
Also, while your at it I might suggest just running phpTidy to format your code to better match www.ads-software.com coding standards. Just nitpicking now, overall fantastic plugin!
https://www.ads-software.com/plugins/view-template-widget-for-toolset-types-views/
- The topic ‘Widget shows on search page’ is closed to new replies.