Reply To: How to publish posts not on the homepage
I am not far from being a noob – so take this with a grain a salt.
Would you try it with tags ?
One home page but only include posts with certain tags for each situation
For your landing page (for non logged users – tag -red) So its only a “landing page” for non-logged in users.
function xonlyinclude_tag($query) {
if ( $query->is_home() && !is_user_logged_in()) {
$query-> set('tag_slug__in',array('red'));
}
return $query;
}
add_filter('pre_get_posts','xonlyinclude_tag');
For your logged in ordinary users (tag – green – normal posts)
function onlyinclude_tag($query) {
if ( $query->is_home() && is_user_logged_in()) {
$query-> set('tag_slug__in',array('green'));
}
return $query;
}
add_filter('pre_get_posts','onlyinclude_tag');
put the 2 functions in your functions.php file
just a thought.