Home › Forums › Support › remove the meta from search results This topic has 3 replies, 2 voices, and was last updated 5 years, 5 months ago by Elvin. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts November 4, 2020 at 10:39 am #1518098 Josh How can I remove the “date BY author” from the search results page? Also, is there any way to add my custom post to the search results? November 4, 2020 at 1:54 pm #1518287 ElvinStaff Customer Support Hi, Also, is there any way to add my custom post to the search results? To clarify: Do you mean, you want to use a custom post list plugin to display search results? How can I remove the “date BY author” from the search results page? Can you link us to the site in question? We should be able to prevent it from displaying w/ custom CSS. You can provide the site details on the Private Information text area. Thank you. November 4, 2020 at 2:09 pm #1518303 Josh I created my own CPT with no plugin. My custom post type does show up, but i guess I was hoping that it could return results by post type. example posts 1 2 2 Pages 1 2 Products 1 2 Site details below. November 4, 2020 at 2:42 pm #1518320 ElvinStaff Customer Support Oh right that makes sense. By default, WordPress doesn’t include custom post types in its search result. For starters let’s try making your search result include your custom post type by adding this PHP snippet: function include_cpt_search( $query ) { if ( $query->is_search ) { $query->set( 'post_type', array( 'post', 'page', 'custom_post_type' ) ); } return $query; } add_filter( 'pre_get_posts', 'include_cpt_search' ); Simply add your custom post type inside the $query->set post_type array(). Reference: https://www.dhirenpatel.me/include-custom-post-type-wordpress-search-result/#:~:text=In%20the%20WordPress%20default%20search,third%20party%20free%20WordPress%20plugin. As for separating posts results by post type, perhaps this can help: https://wordpress.stackexchange.com/posts/181807/revisions Here’s how to add PHP snippets.: https://docs.generatepress.com/article/adding-php/ Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In