Hello Newsmag Support,
I have a question regarding the search functionality in Newsmag.
On my homepage, when using the search bar, the results are not displayed in chronological order. For example, when searching for a keyword such as “Olfer”, older articles are shown before newer ones.
After checking several searches, it seems that the search algorithm prioritizes posts that contain the keyword in the title, while posts that contain the keyword only in the content appear later, regardless of their publication date.
Could you please let me know:
Is this the default behavior of the Newsmag search?
Is there an option to sort search results by publication date (newest first) instead of relevance?
If not, is there a recommended way to achieve this without modifying the theme core?
I’m using the latest version of Newsmag.
Thank you very much for your help.
For example, when searching for a keyword such as “Olfer”, I noticed that posts containing the keyword in the title are always displayed first, even if they are several years old. Newer posts that contain the same keyword only in the content appear much lower in the results.
It seems that the search gives a much higher priority to title matches than to publication date.
What I would like instead is a simple chronological order (newest first), as long as the searched keyword appears either in the title or anywhere in the content of the post.
Is there a built-in option in Newsmag to change this behavior? If not, is there a recommended way to achieve this without modifying the theme core?
Hi,
The post loop that displays the search results should display the results sorted by latest, so the newer posts firsts. This is the case for every post loop, like in the category pages, tag pages, author pages. I tested as you mentioned, and I see there’s a problem, at least on the first page of the search results. There are older posts displayed before newer posts. That’s quite unusual.
Could it be caused by a plugin perhaps? Or what if you try it with a default wordpress theme if possible?
If you want I will take a closer look at it, you can send us an email at contact@tagdiv.com and provide admin access (user and pass) for the website.
Thank you!
