Forums

[resolved] Search results affect Post widget (4 posts)

  1. turboluigi33
    Member
    Posted 2 months ago #

    Hi, I have a really weird problem and I didn't manage to find a post already describing it. I have a post widget set up on the right hand side of my website to always be there. I'm currently using the Sideposts widget, but this problem also affects the Category Posts widget as well. (strangely not Advanced Random posts). In both cases I told the widget to display only one category of posts. Anyway, whenever I search anything, the content in the post widget is replaced by my search results. I have no idea why, nor how to fix it. Any ideas? See it in action @ www.shepherdsclinic.org/testSite

    Thanks!

  2. MichaelH
    moderator
    Posted 2 months ago #

    What happens if you use the default Recent Posts widget? If it works okay, just a note that developers have this line of code in that widget:

    wp_reset_query();  // Restore global post data stomped by the_post().
  3. turboluigi33
    Member
    Posted 2 months ago #

    Thanks for replying, but the Recent Posts widget also does not work. I'll try placing the reset query command in various places in sideposts and see if makes a difference.

  4. turboluigi33
    Member
    Posted 2 months ago #

    It turns out it was because I was using wpSearch, which I forgot about. Deactivating it returns things to normal, so I guess I won't be using it.

Reply

You must log in to post.

About this Topic