question and maybe feature wish
-
Hi,
in my child theme’s functions.php I tried to apply a filter to hide certain posts that belong to a travel guide I’m working on, I tried to use this code here:
function excludeMetaKey($query) { if ( $query->is_home && $query->is_feed && $query->is_main_query() ) { $query->set('meta_key=mappress&meta_value=ns'); } return $query; } add_filter('pre_get_posts', 'excludeMetaKey');
Unfortunately it is not working. I stumbled over your plugin and wonder if it is already doing at least a part of my requirements? Maybe you can extend your plugin to support posts as well? I like to hide certain posts as said from being displayed ad my feeds and main loop. They should still be available by search or category listings.
Many thanks in advance.
Cheers
Yogie
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘question and maybe feature wish’ is closed to new replies.