• Resolved Adam

    (@gourmetbooks)


    Tried JP Search, and while it looks like it does some nice tricks, it also surfaces old post types I haven’t used in years (and which I just spent two hours scrubbing from my database). So I deactivated it, first directly on the plugins page, then in JP settings. But searching still brings up the whole overlay, complete with branding.

    The only way to clear it out completely seems to be deactivating JP altogether. That’s a problem, because I rely on it for a bunch of other functionality.

    Is there a trick to getting Search to let go?

    My site’s a portfolio, mid-redesign, not ready for public view yet. Happy to make an admin login if needed.

    WP: 6.4.3
    Theme: 2024
    Deactivated all other plugins, problem persists

    • This topic was modified 1 year ago by Adam.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hi there,

    If I got this right, you’d like to exclude from the Jetpack Search feature some specific old post types that are still published.

    If you still need to keep them on our site as published but not being fetched by the search feature, we have?a code snippet?for this on Jetpack.com:

    add_filter( 'jetpack_instant_search_options', function($options) {
        $options['adminQueryFilter'] = array(
            'bool' => array(
                'must_not' => array(
                    array( 'terms' => array( 'post_id' => [2266, 1724]) ),
                )
            )
        );
     
        return $options;
    } );

    In case you’re going to remove them completely, then it might be cache-related, so clearing out your site cache should do the trick.

    Hope that answers your question! Let me know how you get on.

    Thread Starter Adam

    (@gourmetbooks)

    Yup, you got it right, basically. I don’t know why I can’t remove those old post types (I’ve cleared all my caches and even manually scrubbed my DB), but regardless, I definitely don’t want them to appear. Thanks for the snippet!

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hey @gourmetbooks,

    Sure thing! Let us know how it goes — keeping in mind that assisting with custom code is out of our scope of support ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search is deactivated but won’t go away’ is closed to new replies.