@dinobib If you just want to display posts on the front end (I presume on a protected page that only editors access?) then that is achievable *without* having to “publish” the post or make it “public”.
Simply create a template file for the Page (or a shortcode in your child theme’s functions.php or other custom plugin file) and add a query using the “post_status” addtribute in your $args with a value of “(whateverstatus)” (using whatever status is is you want displayed).
For example, say you have a custom status added by EditFlow of “awaiting_editor”, then add a query to your template like this example:
$args = array(
'post_status' => 'awaiting_editor',
'posts_per_page' => 50, // whatever number you want per page
);
$my_query = new WP_Query($args);
global $post;
if ($my_query->have_posts()) {
echo '<ul>';
while ($my_query->have_posts()) {
$my_query->the_post();
echo '<li>';
the_title();
echo '</li>';
}
echo '</ul>';
} else { ?>
<div>
<ul>
<li><?php _e('No upcoming Posts'); ?></li>
</ul>
</div>
<?php } wp_reset_query(); ?>
If you have custom fields or metadata you want to access and display along with the standard post title/link (maybe notes on what still needs to be done before publishing), use $global post, if not you can leave that out.
This is just an example and all it does is display a list of unlinked titles of posts with that status…..you can take it further if you want.
I hope this helps!
-
This reply was modified 5 years, 2 months ago by
TrishaM.
-
This reply was modified 5 years, 2 months ago by
TrishaM.