-
-
Save billerickson/e54f95efd0ac1cf8eabd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Exclude Listings from Link Search | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/exclude-listings-from-link-search | |
* | |
* @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