Using this plugin, I created the new post type “Movie Reviews.” As we know by default, the WP search doesn’t include this unless I tell it to via the functions.php file. However, following the official guide here: https://docs.pluginize.com/article/23-post-type-posts-in-search-results
and even trying the codes discussed in a couple prior support threads has not worked. There was one thread that seemed to be headed in the right direction, but that discussion went into private messaging and then was marked as resolved.
I have already, as suggested in one of the other threads, manually added the CPT to the functions.php file – but it did not have any improvement. I’ve also already checked that the CPT ‘Movie Reviews’, which I can include detailed code for below, is public, is publicly queryable, and is not excluded from search.
I am using the Hello Elementor Child Theme. The main theme does have a search.php file that I have not copied into the Child theme – could this be part of the hurdle? A quick glance at that shows is dealing more with the actual layout – which would be overruled by the Elementor Template. [I have disabled my template and still cannot search including the CPT btw]
To clarify my query, as the CPT is Movie Reviews, the primary search keywords would be movie titles (so it’s not an issue with categories or taxonomies). I have tried using a keyword from two published CPT posts, but I cannot get them to show in the results. I am able to add/remove the ‘post’ and ‘page’ slugs from the various codes and that does affect the search results, so the codes are working – just not searching the CPT posts. Heck, I’ve even tried various ways of listing the slug (add underline for the space, remove the space, etc) but nothing has worked.
The page I need help with: [log in to see the link]
- The topic ‘Unable to include CPT in Search Results’ is closed to new replies.