Search not working properly starting with 2nd page

Posted in: Newspaper
Post count: 8

Hello,

I have a problem with the search functionality on my blog: the 2nd page of the results is not showing properly.
For more details, please check https://travelpassion.ro/?s=a where the search string in this case is ‘a’, then scroll down to bottom and click on page 2.
Expected results: go to page 2 of the search results.
Actual results: page 2 is actually displaying the same results as https://travelpassion.ro/page/2/ which is the 2nd page of items from my blog.

Thank you!

Post count: 20688

Hi,

Please try as a first step to deactivate all your plugins except Visual composer, clear the cache and check to see if the problem is still there. Also check any custom code you might have entered in theme panel, or added to the theme files. If you use a child theme try switching to the main theme, because this could affect the functionality. Please let us know how it goes.

Thanks

Post count: 8

Hello,

I’ve deactivated all the plugins and the problem is still there. It must be an issue related to the Newspaper theme which I thing is using custom pagination? That is the only theme that I’ve ever used. I don’t have a search enabled on other themes to test out. I didn’t do any changes on the theme files other than the translations from English to Romanian.

Thank you!

Post count: 8

Also, the search functionality is also listing pages in the response. I don’t want that to happen. Is there a way to disable this?

Post count: 8

Can you please take a look at this post? Maybe it helps. It describes somehow the same issue.
https://wordpress.org/support/topic/search-not-working-for-pages-1/

Thank you!

Post count: 8

Here is a quick fix for how to not show pages in the search results: http://www.wpbeginner.com/wp-tutorials/how-to-exclude-pages-from-wordpress-search-results/
Maybe you will link this to a UI button in future, so that it can be disabled more easily.

Thank you!

Post count: 20688

Hi,

I have tried to replicate your problem, but I have not been able to. The search function is working properly. You could try a fresh theme install, and use only the plugins bundled with the theme. Then check to see if this issue persists. Please let us know how it goes.

Thanks

Post count: 8

Hello,

I’ve just installed last night the latest version of the theme. The problem is still there. Only the search pagination is not working. Pagination for any other page is working great (authors, categories, tags, etc.).
Do you know an easy way to disable all my plugins and Newspaper theme without losing all their settings?
Would renaming their folders to something else and then renaming them back properly do the trick?

Thank you!

Post count: 20688

Hi,

Disabling the plugins is very important in this case, because a plugin could be the cause of this, or a child theme, since the problem is not manifesting on our side. You could try to rename the plugins folder or just deactivate them one by one in the plugins section and checking to see if the problem is still there. If nothing works, please try to make a fresh install by FTP – https://forum.tagdiv.com/install-via-ftp/ and install only the plugins bundled with the theme. Also if the search issue is present after taking these steps, please contact us at contact@tagdiv.com and provide admin login information, and paste a link to this topic for identification purposes.

Thank you for understanding!

Post count: 30

I’m seeing this same issue with NewsMag. De-activating all plugins also did not work. Is there a known solution here?

Post count: 20688

Hi,

I believe in this situation this was not theme related. The issue was happening with a default WordPress theme as well. It was caused by the Caddy server configuration.
This is a quote from sandreiiulian with the solution

I’ve finally managed to fix the problem!
As I was saying in a previous e-mail I am using Caddy as a server software and not Apache.
Caddy DOES NOT use a .htaccess file at all. That is why the file was completely missing from my root directory.
Still, the problem was related to the rewrite policy defined in the Caddyfile.

I was using:

rewrite {
if {path} not_match ^\/wp-admin
to {path} {path}/ /index.php?_url={uri}
}

The correct rule for Caddy server is:

rewrite {
if {path} not_match ^\/wp-admin
to {path} {path}/ /index.php?{query}
}

The permalink structure can be defined in any custom form, preferably /%year%/%monthnum%/%day%/%postname%/
I hope this trick will help any of your other customers that might be in a similar situation.

Thanks

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