Search doesn't work properly when category is defined

Posted in: Newsmag
Post count: 1

Hi,

I’m trying to create a custom search page with search results are limited to a category and divided into two groups based on relevance. However, I noticed the theme’s search function doesn’t work property when a category is defined. I tried using site/category-page-name/?=search and site/?search&category_name=category-name. Both returned the same incorrect (incomplete) results. I discovered that by running a WP_Query(array(‘s’ => $search_query ,’category_name’ => $category-name)) myself, and the result was correct.

Just wondering if there’s anything in your code that adds extra parameters to the search that leads to this incorrect search results?

Post count: 23312

Hello Brightfox,

Please notice that until now we do not receive any bad reports in this regard. Please provide more details about your issues and also, you can provide your website URL so I can inspect it closer. Please provide some useful screenshots so I can identify the problem. Also, please ensure that your untested plugins do not affect your search function. To rule out this case, please disable all of them and install only the plugins that come bundled with our theme.

Thanks for your understanding!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newsmag’ is closed to new topics and replies.