• Hello,

    I refer to this previous topic: https://wordpress.org/support/topic/public-custom-post-types-does-not-show-in-main-wp-search/

    And also these posts: https://wordpress.stackexchange.com/questions/268804/include-custom-post-type-content-in-search and https://stackoverflow.com/questions/28472370/wp-query-wont-return-one-of-the-custom-post-types-when-multiple-post-types-requ

    We are having a similar issue where polylang is breaking the standard wordpress search and causing custom post types to not show up in the search. The difference is that we do want to translate all custom post types eventually (not done yet) so I have gone into the polylang settings and checked the boxes to include all our custom post types.

    Still they do not show up in the main wordpress search which should not be affected by polylang in any way.

    As soon as I deactivate polylang our search works exactly as expected.

    We have tried 3 different methods to make the search include all of our custom post types with polylang active and none of them have worked. We have tried the standard pre_get_posts filter addition to the functions.php file plus the plugins ivory search and relevanssi. None of these solutions works until I deactivate Polylang in which case they all work exactly as expected, so ultimately Polylang is the issue here.

    We are currently looking to purchase the Polylang for Woocommerce as one of our custom post types which needs to show up in the search is woocommerce “products”. However we certainly don’t want to purchase this plugin if we cannot use polylang at all because it breaks core wordpress functionality.

    I have also looked at the string translations and rebuilt the permalinks since adding the custom post types in polylang and nothing is working. As you can see we have done our research and we are are all out of ideas.

    Can you please advise how we can have polylang enabled and also have the wordpress core search function show custom post types?

    Note: some of the custom post types were added AFTER polylang was installed. I don’t see that this should be an issue but I’m just mentioning it in case that is relevant.

    Thank you very much,
    Nicole

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter nicole2292

    (@nicole2292)

    Hello, authors of Polylang.

    Do you have any feedback on this topic?
    Do you have a fix for this bug in progress?

    I’m still waiting to see if this can be resolved before purchasing Polylang pro. If I don’t get a response here then I will have to submit a support request over at https://polylang.pro/ as this is a pre-sales question.

    Best Regards,

    Nicole

    antraksa

    (@antraksa)

    Hi! I had the same problem. It turned out that default language was not assigned to custom posts, although they were checked in the setting for translation. After setting the language (there appeared a prompt that offered to set default language for all my posts) search started working.

    • This reply was modified 4 years ago by antraksa.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Post Types do not show in main WP search with Polylang active’ is closed to new replies.