• Resolved MBWD

    (@mbwd)


    I have used this plugin on numerous other sites in the past with no issues, and I think it’s brilliant. However, I’m setting up a new site, and I’m having difficulties getting CPTs to show up in search results.

    The CPT is called ‘usp_post’ and is created by the USP Pro plugin. This is a plugin that allows user-submitted posts through the front end. The CPT is set to be publicly queryable and visible, and it appears in the list of indexable options in the Relevanssi settings. I have made sure the relevant box is checked and rebuilt the index.

    I’m also adding the terms ‘all, visible’ (without quotes) in the ‘Custom fields to index’ box toward the bottom of the Settings page.

    I have tried adding a pre_get_posts function that mentions the usp_post CPT in an array of types to search. This has no effect. I do already have another function using pre_get_posts that is there in order to allow usp_post CPTs to show up in archive pages, but removing that function has no effect on the problem.

    Any help would be greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter MBWD

    (@mbwd)

    Just in case it was a theme conflict (I’m using a child theme of Divi, and am not entirely clear yet on what page generates search results) I switched to Twenty Seventeen and encountered the same issue. Search.php in this theme does use get_search_query but doesn’t seem to use any queries that are known to cause Relevanssi to fail.

    Thread Starter MBWD

    (@mbwd)

    It appears this is actually a conflict related to the Polylang plugin. When I deactivate Polylang, search works as it’s supposed to. Marking this as resolved.

    Plugin Author Mikko Saari

    (@msaari)

    Relevanssi should work with Polylang, though, but I know there can be problems sometimes if the translations aren’t set up properly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Not picking up CPTs’ is closed to new replies.