Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › ASP shortcode showing in excerpts of Cat Archive Pages
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 4 years, 3 months ago.
- AuthorPosts
- March 5, 2019 at 6:22 pm #21406
ASP shortcode is present in the excerpts when viewing category archive pages. (ref: https://intranet.ptanc.com/category/facility-specific-scope-of-care/)
Attachments:
You must be logged in to view attached files.March 6, 2019 at 9:35 am #21422Hi,
It’s because the search plugin is actually included within each post as the post content, see: https://i.imgur.com/zOYm0Ti.png
I am not sure if that is possible to remove, as it is within the post content, and the excerpt is automatically generated on those pages. Maybe via a custom code, but I am not sure if that does anything.
Try add this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!
Best,add_action('wp_head', 'asp_shortcode_unset_archive'); function asp_shortcode_unset_archive() { if ( is_archive() ) { add_shortcode('wd_asp', 'asp_empty_sc'); add_shortcode('wpdreams_ajaxsearchpro', 'asp_empty_sc'); } } function asp_empty_sc() { return ''; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 6, 2019 at 11:56 am #21436The worked perfectly. Thank you!
KO
March 6, 2019 at 11:57 am #21437You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.