Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #831567

    In the header search (ajax) is listing the products but when click on “view all results” link there is no result shown.
    I tried to add this to functions but didnt work. Still no results.

    function search_filter($query) {
      if ( !is_admin() && $query->is_main_query() ) {
        if ($query->is_search) {
          $query->set('post_type', array( 'product' ) );
        }
      }
    }
    add_action('pre_get_posts','search_filter');

    Can someone explain why AJAX gives results but “view all results” link gives NONE?

    #831581

    Hey amrod1,
    Please include the url to the page in question so we can take a closer look.

    Best regards,
    Mike

    #831603

    I am testing in localhost. I also tried to install relevanssi and check these;
    https://www.relevanssi.com/knowledge-base/query_posts/
    http://kriesi.at/documentation/enfold/use-relevanssi-in-search-instead-of-the-default-search/
    I also disabled Yoast SEO.
    Still not working :'(

    • This reply was modified 7 years, 3 months ago by amrod1.
    #831608

    I disabled Polylang plugin and now its working. Sorry :/
    So is there a conflict between Polylang plugin and enfold or wordpress?

    • This reply was modified 7 years, 3 months ago by amrod1.
    #832627

    Hi,

    Thanks for the feedback. I haven’t heard of any conflicts with theme, is it working with for instance TwentySeventeen?

    Best regards,
    Rikard

    #833087

    Hi,
    I also tested on twentyseventeen, its not working with it too. So its not Enfold theme issue.
    Its absolutely Polylang’s BIG BUG. I am considering to move to WPML since its very serious problem for a multilingual e-commerce website that has no search :/
    But I wonder how Enfold header search be able to show results but no search pages :/ Is it because of AJAX ?

    #835258

    Hi,

    I’m sorry but we are not sure what’s causing the issue. Have you tried to contact the plugin author? I’m sure they will be able to help you.

    Best regards,
    Ismael

    #837174

    Polylang author did not respond in wordpress support forums and it took 1 week to answer in github (he just said he couldnt reproduce it so he close the case)
    I ended up moving to WPML which is working good for now.
    Thank you.

    #837609

    Hi!

    We’re glad that you have your site working now. Please let us know here in the forums if you have other questions or concerns. We will do our best to help you.

    Cheers!
    Sarah

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.