Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Regular engine not searching custom post types but is configured to do so
This topic contains 6 replies, has 2 voices, and was last updated by Ernest Marcinko 3 years, 10 months ago.
- AuthorPosts
- May 29, 2019 at 5:49 pm #22946
I have configured Ajax Search Pro on the site using regular engine. I have configured it to search from “pages” and “products” (custom post type), but search widget only shows pages as results.
If I switch to index engine, products are shown, but then I get results for both configured website languages, which we don’t want (Polylang is used for multilang).
How can I get products (custom post type) results appear in search results using regular engine?
Or alternatively how can I configure index to only index items in one language (will need to create two indexes and two search forms for that). Can’t find such option today.Let me know if you need access to admin or FTP. Plugin code has not been touched by any way.
Attachments:
You must be logged in to view attached files.May 29, 2019 at 5:51 pm #22948I also have one more question. I am showing the search widget inside a modal window. Is it possible to get focus on the search input when modal is opened? jQuery.focus() function is not working for some reason. Does the widget need special function for this?
May 30, 2019 at 9:00 am #22953Hi!
Thank you for the details. Can you please add temporary FTP and admin details? I would like to debug the search query to see why the results are missing.
Try using the jQuery focus delayed by a bit. Something like this:
jQuery(function($){ $('.search-open').on('click', function(){ setTimeout(function(){ $('input.orig').focus(); }, 500); }); });
The modal may have a different focus setting on clicking, and this delay should do the trick.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 30, 2019 at 5:26 pm #22963You cannot access this content.May 31, 2019 at 8:55 am #22970Hi Verner,
I think I see what the problem is. The Products are not translated via Polylang, but the Polylang compatibility is set on the plugin back-end. This automatically filter the products. If you turn off the polylang compatiblity, then they should start showing up within the results.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 31, 2019 at 5:15 pm #22978Hi,
Thank you very much, this indeed did the trick.
Thanks again, great support service, highly appriciated. 🙂
Best regards,
VernerJune 3, 2019 at 1:05 pm #22996You cannot access this content. 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.