Skip to content

Instantly share code, notes, and snippets.

@billerickson billerickson/functions.php Secret
Created Dec 20, 2013

What would you like to do?
* Exclude Listings from Link Search
* @author Bill Erickson
* @link
* @param array $query, wp_query arguments
* @return array $query
function be_exclude_listings_from_link_search( $query ) {
$query['post_type'] = array_diff( $query['post_type'], array( 'listing' ) );
return $query;
add_filter( 'wp_link_query_args', 'be_exclude_listings_from_link_search' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.