Regular engine not searching custom post types but is configured to do so

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 Ernest Marcinko 3 years, 2 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #22946
    phi
    phi
    Participant

    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.
    #22948
    phi
    phi
    Participant

    I 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?

    #22953
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 :)


    #22963
    phi
    phi
    Participant
    You cannot access this content.
    #22970
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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 :)


    #22978
    phi
    phi
    Participant

    Hi,

    Thank you very much, this indeed did the trick.

    Thanks again, great support service, highly appriciated. 🙂

    Best regards,
    Verner

    #22996
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.