This is a Big Fat Test post to see about a couple of things:

Does it show up if I use the incognito tag?

How about if I use multiple tags?

Looks like the incognito category tag hides the category from any taxonomy listing. (WAIT – maybe not – the incognito category might show up in a taxonomy filter even though the posts don’t.  Might be a cache thing.  Might have to test more if it ever becomes important.) 

Looks like it hides the post from any archive pages.

Looks like it works to hide the post from the posts page even if the post has multiple category tags.

Here’s how it works:  add this to the bottom of the functions.php file in the child theme:

add_action( ‘wp_enqueue_scripts’, ‘child_enqueue_styles’, 15 );
function exclude_category_posts( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( ‘cat’, ‘-22’ );
}
}
add_action( ‘pre_get_posts’, ‘exclude_category_posts’ );
add_filter( ‘auto_update_plugin’, ‘__return_false’ );

Guess I should paste this in a doc in my WSL folder so I can find it by searching “incognito” – for when I get rid of the astra theme and lose that child theme file.

Chuck kielbasa hamburger jowl. Biltong doner ham hock, beef ribs prosciutto sirloin leberkas. Filet mignon salami burgdoggen shoulder pancetta frankfurter. Chuck beef buffalo turducken ham kielbasa fatback. Meatball porchetta alcatra, beef ball tip salami tenderloin pancetta bresaola short loin prosciutto picanha flank pork loin.

Ribeye jowl prosciutto chicken boudin buffalo cow andouille pig pork chop turducken pork pork belly picanha. Pork chop pork loin prosciutto drumstick. Jerky spare ribs landjaeger pork belly sirloin shank leberkas. Hamburger bacon chuck short loin cupim sausage short ribs jowl burgdoggen andouille bresaola. Pork chop meatball fatback jowl corned beef, hamburger chicken alcatra pig jerky. Pork chop shoulder meatball ground round tri-tip tail pork belly meatloaf prosciutto tenderloin spare ribs venison kielbasa andouille. Beef doner chicken venison drumstick kevin hamburger t-bone fatback spare ribs burgdoggen strip 

Facebook
Twitter
LinkedIn
Scroll to Top