• Resolved ambientblog

    (@ambientblog)


    Since WP4.9.6 I noticed that a search resturns the correct items, but with a list of ALL blogposts following the search results.
    Anyone else noticed this?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Joey

    (@leglesslizard)

    Hey,

    Sorry can’t say I can replicate this. Got a link where we can see this happening? Tried a different theme at all?

    Kind regards,
    Joey

    Thread Starter ambientblog

    (@ambientblog)

    Here’s a link: https://www.ambientblog.net/blog//?s=hassell

    This should return only the first entry. Below that are all recent posts.
    Have not tried a different theme yet, will do asap

    Joey

    (@leglesslizard)

    Yeah I see what you mean. How is your search template looking? You should have a search.php file within your theme that dictates what is shown on this page. I’m unsure how this is related to the 4.9.6 update, however, but this file should give us a clue as to why these extra posts are being displayed.

    Thread Starter ambientblog

    (@ambientblog)

    It definitely is a theme issue. No problem when I switched themes. Strange thing is that this behaviour only started after the latest WP core update. Oh well.

    Joey

    (@leglesslizard)

    Well, at least you found out where the issue is ?? if you’re happy to show the search.php we may be able to provide ideas of how to adjust it. Otherwise, contact the theme support/developers and ask how to adjust. A lot of developers are more than happy to help ??

    Good luck!

    Thread Starter ambientblog

    (@ambientblog)

    OK, that’s great, how do I post the search.php? Just copy the code here in a post?
    I’ll definitely contact the theme developers. Slight problem may be that they have a version update already but upgrading ruins my (child) version of the theme. Correcting that would probably be a lot of work so it’s either that or choosing a different theme.

    (BTW I was wrong in my example that it should return only the first entry. In this test version of the blog (with a random theme TwentySeventeen) you see the correct search results, which is definitely more than one
    https://abtest.vancooten.com/?s=Hassell)

    Joey

    (@leglesslizard)

    I’d always suggest running the latest version of any themes and plugins where possible. As well as functional updates there may well be security updates released so you really should keep everything up to date. With that in mind I’d advise first activating the parent theme rather than your child theme and test the search functionality to ensure it is a problem with the parent theme and not the child. Then I’d look to upgrade the parent theme and fix the errors in the child theme.

    If you decide to stick with the current theme version then you can overwrite the search.php by copying it to your child theme directory. If you compare your current theme’s search.php with a working theme’s file (e.g. twentyseventeen) you may be able to identify the issue. Feel free to paste the search.php using the code tags (above) as I/some one else may be able to help you find the problem.

    Thread Starter ambientblog

    (@ambientblog)

    We’re narrowing it down now: the problem is not in the theme itself but in the child version.
    I won’t bother you with the code for now, because I’ll dive into this first and try to find the difference myself.
    Thanks for your help and suggestions

    • This reply was modified 6 years, 9 months ago by ambientblog.
    Thread Starter ambientblog

    (@ambientblog)

    PROBLEM SOLVED!
    The misbehaviour was caused by another plugin (Facebook Pixel), that was recently installed but which I didn’t need anyway. Deactivating it solved the problem.
    ??

    Joey

    (@leglesslizard)

    Awesome, nice one ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘4.9.6 search displays all posts’ is closed to new replies.