How to hide post by tag(tag)?

Hello I am new to wordpress I'm having here is the question
how to hide post with opredennyh label(tag)?

the only thing that I found this
post processing hook for the tag
function F2($the_content) 
if( has_tag( 'Sir' ) ) 
 echo "not meta"; 
add_filter('the_content', 'F2');

And the hook that hides a post by a specific id
exc_post function($query) {
if ($query->is_category || ($query->is_home || ($query->is_feed)))
{$query->set('post__not_in', array(1137,1136) );} // in brackets the id of the post (entry)
return $query; }

but I don't understand how to connect them
please tell me how to do it
March 12th 20 at 07:59
1 answer
March 12th 20 at 08:01
There are at least two solutions:
1) Hide on any event after hatch ? In the main loop of the output layer (div) for example add an attribute equal to the id, slug or name tags, and event (nagetiere anything else) jQuery script to hide or remove the div with the entry.
2) do Not display.. to Write the right arguments to main loop
Could you tell us a bit more since I'm new to wordpress and unfortunately I can't Google right hooks and arguments. - rowland_Brakus commented on March 12th 20 at 08:04
@rowland_BrakusWhich case is under consideration ? Hide after launch, or not output at all? - Aidan_Harv commented on March 12th 20 at 08:07

Find more questions by tags WordPress