WordPress.org

Ready to get started?Download WordPress

Forums

Search Engine
Fixing issue with "Recent Posts" interference (2 posts)

  1. trickey
    Member
    Posted 3 years ago #

    I'm doing a new blog site for a client and added your plugin to it. I love the functionality and understand it's still in beta, but I found a major bug.

    If you add "search_engine_content()" on a search page or loop-search.php, it will overwrite the posts listed in the "Recent Posts" widget on the sidebar. It look like this is being caused by the search_engine_get_posts function. It's tying in to the "the_posts" hook which is called by the "Recent Posts" widget. However, I've found an easy and permanent fix.

    On line 1047, change:
    if (!is_search())
    to
    if(!is_search() || is_dynamic_sidebar())

    This will cause the function to return if it is being called from a sidebar/widget. Just thought I'd share in case anyone else had run across this, and that it would be good to add to the next release.

    Thanks for this plugin! It's awesome!

  2. Scott Kingsley Clark
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for the fix, will implement in the next version!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic