/*****************************************************************************
** Must be in functions
*****************************************************************************/
add_action( 'pre_get_posts', 'kobotolo_change_query' ); function kobotolo_change_query ( $query ) { if ($query->is_main_query() && $query->is_home()) : if( is_user_logged_in() && current_user_can('edit_posts') &&!is_admin()) : $query->set( 'post_status',array('publish','future')); endif;
endif; return $query;
} /***************************************************************************** ** Show text in future modules *****************************************************************************/ remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); add_action ('genesis_entry_content','handle_future_post'); function handle_future_post () { if (get_post_status()==='future'): echo 'Modulen kommer att publiceras den '.get_the_date(); else : genesis_do_post_content(); endif; }