Home › Forums › Support › Restrict shortcode search to a custom post type This topic has 2 replies, 2 voices, and was last updated 2 years, 2 months ago by George. Viewing 3 posts - 1 through 3 (of 3 total) Author Posts July 9, 2022 at 2:27 pm #2278189 George I am using the following shortcode found on this thread to display a search element on a page. Is it possible to restrict that shortcode to only search to a custom post type named Courses? July 10, 2022 at 4:13 am #2278384 DavidStaff Customer Support Hi George, ok, if you want all instances where the get_search_form is output then you can use its filter hook: https://developer.wordpress.org/reference/hooks/get_search_form/ But seeing as that filter i don’t think is used in the Search Block, then i would probably write my own form. See Tom’s reply here for an example: https://generatepress.com/forums/topic/limit-custom-search-results/#post-1422120 July 10, 2022 at 4:24 am #2278390 George Yeah, that was a good pointer, thanks! Author Posts Viewing 3 posts - 1 through 3 (of 3 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In