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 2 weeks, 2 days ago.
- AuthorPosts
- April 2, 2024 at 10:53 am #47647
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.April 2, 2024 at 1:14 pm #47655Hi,
Thanks for the details!
I can’t see much on the results page, but usually these issues are related to one of these things:
Best,
– 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
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 4, 2024 at 9:53 am #47700But 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¤t_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¤t_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.
April 5, 2024 at 2:12 pm #47717The 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
Best,
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.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 12, 2024 at 9:47 am #47766You cannot access this content.April 12, 2024 at 3:53 pm #47770Can 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 :)
April 15, 2024 at 2:21 pm #47783You cannot access this content.April 16, 2024 at 9:52 am #47791Thanks!
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
andpage
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 :)
April 17, 2024 at 8:19 am #47803You cannot access this content.April 17, 2024 at 12:33 pm #47814Those 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 :)
April 18, 2024 at 7:57 am #47837You cannot access this content.April 18, 2024 at 8:14 am #47839Great, 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 :)
April 18, 2024 at 9:10 am #47844You cannot access this content.April 18, 2024 at 11:12 am #47846One 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.
April 18, 2024 at 1:44 pm #47847Sure!
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 :)
- AuthorPosts
You must be logged in to reply to this topic.