• Resolved OgdenNews

    (@ogdennews)


    We are currently running PHP8 and WordPress 7.0.2 the search plugin seems to quit working properly. When you go to the site and search it brings up obits only when it should be checking the whole site.

    Here is my filter code.

    /**
    * Add filter query conditions to cloud search
    */



    function add_filter_query_conditions( $extra_conditions ) {

    include(ONI_ABSPATH . ‘assets/settings/’ . DB_NAME . ‘/’ . ‘variables.php’);

    $myURL = parse_url($_SERVER[‘HTTP_REFERER’], PHP_URL_QUERY);

    $dfp_array = get_option(‘global_dfp’);

    if(isset($myURL) == “search_cat=obits”) {
    $extra_conditions = “(and site_id:'” . $request_cloudsearch_site_id . “‘ category:’Obituaries’)”;
    } else {
    //$extra_conditions = “(and (not category:’Uncategorized’) site_id:'” . “‘$request_cloudsearch_site_id’)”;
    $extra_conditions = “(and site_id:$request_cloudsearch_site_id)(not category:’Uncategorized’)”;
    }
    return $extra_conditions;

    };
    add_filter( ‘acs_add_filter_query_conditions’, ‘add_filter_query_conditions’, 10, 1 );

    There are no redirects on the site I checked.

    Any Help would be appreciated.

    • This topic was modified 2 weeks, 2 days ago by OgdenNews.

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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.