Support » Plugin: Search Exclude » Excluding pages stopped working

  • Resolved Bence Bokor

    (@bokorben)


    Hi there

    I’ve been using your plugin for a while and it’s been working a treat but I’ve just noticed that even when I check “Exclude from Search Results” on a page the page still shows in the search.

    Not sure how long this has been happening…

    I’m using the The7 theme.

    List of plugins:

    • 404page – your smart custom 404 error page v2.1
    • Advanced Custom Fields PRO v5.3.8.1
    • Category and Taxonomy Image v1.0.0
    • Category Order and Taxonomy Terms Order v1.4.8
    • CM Tooltip Glossary Pro+ v3.3.7
    • Contact Form 7 v4.4.2
    • Contact Form 7 – Dynamic Text Extension v2.0.1
    • Custom Post Type UI v1.3.5
    • Delightful Downloads v1.6.4
    • DHVC Woocommerce Products Layouts v2.2.26
    • Duplicator v1.1.14
    • Equal Height Columns v1.1.0
    • Optimize Database after Deleting Revisions v4.1.10
    • Page scroll to id v1.6.1
    • Post-Duplizierer v2.17
    • PrivateContent v5.11
    • Redirection v2.4.5
    • Regenerate Thumbnails v2.2.6
    • Search Exclude v1.2.2
    • ShiftNav Pro – Responsive Mobile Menu v1.4.0.1
    • Slider Revolution v5.2.6
    • Timber v1.1.1
    • Ultimate Addons for Visual Composer v3.16.6
    • WooCommerce v3.16.6
    • WooCommerce Product Categories Selection v2.0
    • WooCommerce Single Product Page Builder v3.0.3
    • WooSidebars v1.4.3
    • WP Smush v2.3.1
    • WP-FFPC v1.10.0
    • WP-Optimize v1.9.1
    • WPBakery Visual Composer v4.12
    • YITH WooCommerce Catalog Mode v1.4.0
    • YITH WooCommerce Product Slider Carousel Premium v1.0.4
    • Yoast SEO v3.4
    • Zendy Speed: Query Strings v2.0.4

    Any help would be appreciated!

    Ben

    https://wordpress.org/plugins/search-exclude/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Bence Bokor

    (@bokorben)

    I’ve figured out, that after disabling the plugin PrivateContent, it’s working again. So I have to check up there what’s going on..
    https://codecanyon.net/item/privatecontent-multilevel-content-plugin/1467885

    Plugin Contributor pronskiy

    (@pronskiy)

    Hi Ben,

    Thanks for reporting the issue. Please contact me by email (roman@pronskiy.com) if you need help from my side to resolve this faster.

    Best regards,
    Roman

    Plugin Contributor pronskiy

    (@pronskiy)

    Just a follow-up.

    After some debugging with Ben, we found that the problem occurred because of conflict with PrivateContent plugin.

    The workaround is to add following code in theme functions.php file:

    
    function search_exclude_compat($exclude_array) {
        global $pluginSearchExclude;
        $method = new ReflectionMethod('SearchExclude', 'getExcluded');
        $method->setAccessible(true);
        $excluded = $method->invoke($pluginSearchExclude);
        $exclude_array = array_merge($exclude_array, $excluded);
    
        return $exclude_array;
    }
    add_filter('pc_pages_wp_query_filter','search_exclude_compat');
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Excluding pages stopped working’ is closed to new replies.