This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

ASP shortcode showing in excerpts of Cat Archive Pages

Home Forums Product Support Forums Ajax Search Pro for WordPress Support ASP shortcode showing in excerpts of Cat Archive Pages

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21406
    VelaAgencyVelaAgency
    Participant

    ASP shortcode is present in the excerpts when viewing category archive pages. (ref: https://intranet.ptanc.com/category/facility-specific-scope-of-care/)

    #21422
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    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!

    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 '';
    }
    #21436
    VelaAgencyVelaAgency
    Participant

    The worked perfectly. Thank you!

    KO

    #21437
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.