Hello,
What I'm doing is checking for the latest post(s)
I use
$recent_posts = wp_get_recent_posts();
to get the recent posts and then
foreach( $recent_posts as $post ){
$wpname = $post["post_title"];
$wplink = get_permalink( $post["ID"] );
echo '
[WP_CFG]<br>
wppname="'.$wpname.'"
wpplink="'.$wplink.'"
wppactive="1"';
break;
}
to output the latest post
but I need to check if the post is a draft or not
so if it is it will continue to the next post...
But I don't know if and if yes how to check if a post is for draft or not.
So can you check for this and if yes how?