isset, display excluded posts with a tag
-
I have this function:
function exclude_tagged_posts( $query ) { if ( $query->is_main_query() && $query->is_home() ) { $query->set( 'tag__not_in', array( 404 ) ); } } add_action( 'pre_get_posts', 'exclude_tagged_posts' );
It excludes posts with a tag with ID = 404 from the search. Now, I would like to call a function from the address bar that only displays tags with ID = 404. How to do that? All I know is that you have to use a condition:
is_home() && isset( $_GET['function_name'] )
Right?
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘isset, display excluded posts with a tag’ is closed to new replies.