[wp-trac] [WordPress Trac] #46394: Create a Function to Allow the WordPress Search to Only Return Results from a Specified Post Type

WordPress Trac noreply at wordpress.org
Fri Mar 1 17:54:34 UTC 2019


#46394: Create a Function to Allow the WordPress Search to Only Return Results from
a Specified Post Type
-----------------------------+------------------------------
 Reporter:  pauljohnknight   |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by elrae):

 You can already accomplish this using the pre_get_posts filter, reference
 here:
 https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts for
 more information on how to put that together. Unless this doesn't cover
 your use-case for some reason, I doubt this will be something that gets
 implemented.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46394#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list