Plugin doesn't return products on search page, only posts

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Plugin doesn't return products on search page, only posts

This topic contains 14 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 2 months ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #47647
    mariusblk
    mariusblk
    Participant

    Hello,

    I have setup the Search Sources -> Post Type Search -> Search in custom post types for Products and Posts so anytime someone types anything plugin searches only in posts and products. (see screenshot 1)

    I also setup that results will display as you type in dropdows and it works as expected. (see screenshot 3)

    After you press enter or the magnify glass i setup a results page (see screenshot 2)

    Now the thing is that if i search for any term related to my website, and 1st we refer to the suggested search term, no product is displayed only posts, you can try any of the suggested keywords from homepage. Like i said the live search works as expected and the results page does not show any products in results.

    Even if i try my own search term the result is the same. I tried the term “linie debitare” and on the 1st result page i got 3 results and on the 2nd page 17 results.

    Please see all attached screenshots.I can only attach 4 but i could show you more instances.

    To test any of the search terms please visit website homepage you will find the searchbar.

    I use Flatsome theme, and i unchecked all related to Site search in theme settings.

    I use latest plugin version, latest wordpress and woocommerce 8.6.1

    Please advise me. Thank you!

    Attachments:
    You must be logged in to view attached files.
    #47655
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thanks for the details!

    I can’t see much on the results page, but usually these issues are related to one of these things:
    – If you use a theme builder, make sure the correct archive widget is used. Some archive widgets are only capable of displaying the “post” and the “page” post type, even though the plugin sends all the correct results to the page.
    – Make suer to have no custom codes used for the search query or in the search results template files
    – Also make sure that no other search plugin is active, as both may try to override the results and cause a conflict

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #47700
    mariusblk
    mariusblk
    Participant

    But this url structure is correct? I mean it looks like a link generated by Ajax Pro?

    ?s=rindeluit&asp_active=1&p_asid=1&p_asp_data=1&filters_initial=1&filters_changed=0&qtranslate_lang=0&woo_currency=EUR&current_page_id=8782#038;asp_active=1&p_asid=1&p_asp_data=1&filters_initial=1&filters_changed=0&qtranslate_lang=0&woo_currency=EUR&current_page_id=8782

    Search term is “rindeluit” and after i hit enter this is the url structure of the search page. As i told you, i have Flatsome theme installed and i don’t know if the built in search function interferes with Ajax Pro.

    Also you can see that on 1st page there are no results displayed but if you switch for the second page, that one is populated.

    Thank you.

    #47717
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    The URL is correct – that signals the override. However if you do that via a simple URL ?s=rindeluit you get the same issues.
    This tells me that there might be some sort of a misconfiguration on the archive page, or a custom code or another 3rd party override. The built in search from the theme should not be an issue, Flatsome uses the core WP search, which is perfectly fine.

    Also, can you please make sure that nothing is selected on this panel: https://i.imgur.com/AGSwtPB.png
    That may explain this as well, but it’s super rare. My best guess is still that the results page uses some sort of an archive which can’t display the results and simply skips, and therefore the 2nd page appears to be functional, as it contains the expected post types.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #47766
    mariusblk
    mariusblk
    Participant
    You cannot access this content.
    #47770
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Can you please add temporary back-end and FTP access details so I can debug the issue?

    It’s probably something minor, but I will have to debug it directly.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #47783
    mariusblk
    mariusblk
    Participant
    You cannot access this content.
    #47791
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thanks!

    I have found the issue, it is unfortunately the theme. In the layout code, it uses a custom loop, which only allows posts, featured_item and page post types, please see screenshot of the related code here: https://i.imgur.com/KHuKX7R.png
    If I change it to any and remove the last code block, then it works: https://i.imgur.com/rRZCItG.png
    However making this change is a really bad idea, as any future update to the theme will override it.

    There is probably a reason behind this, the grid might be designed for only those post types. You can let the theme author know, this might be just a bug. If it’s intentional, then he could add a hook to change these query args in a future release.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #47803
    mariusblk
    mariusblk
    Participant
    You cannot access this content.
    #47814
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Those screenshots are not the same results page, that looks different from the regular results page.

    When I deactivate the Ajax Search Pro plugin and visit the results page I get this layout: https://i.imgur.com/GDPsFK4.png
    Which is different from the screenshots.

    That looks like either a custom made archive page of some sort or triggered by a URI param. Can you share what the URL is when you are on that modular page?

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #47837
    mariusblk
    mariusblk
    Participant
    You cannot access this content.
    #47839
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Great, this was very helpful.

    Luckily it is possible to set it up, I have changed if for you here: https://i.imgur.com/MG3Q7ef.png

    Now the plugin will redirect with the same exact parameters as the theme search, resulting in that page layout.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #47844
    mariusblk
    mariusblk
    Participant
    You cannot access this content.
    #47846
    mariusblk
    mariusblk
    Participant

    One more thing and i’m off, did not find an option to exclude from search some of the pages let’s say, by name or id. Can you walk me through or share a link from knowledgebase?

    Thank you again for your awesome support.

    #47847
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Sure!

    Please check this documentation: https://documentation.ajaxsearchpro.com/advanced-options/excluding-and-including-results/exclude-by-item-or-id

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.