Hi @spreaditunlimited – yes, you can use the ppn_post_query_arg
filter to change the query arguments provided to WP_Query and include draft posts. That option is noted here:
https://wordpress.org/plugins/printable-pdf-newspaper/#what%20filters%20and%20hooks%20are%20available%3F
The filter would need to be added in your custom theme or plugin code. Here’s an example that I just tested and seems to work:
/**
* Include published and draft posts in Printable PDF output
* @param $query_args
* @return mixed
*/
function ppn_include_draft_posts( $query_args ) {
$query_args['post_status'] = array( 'publish', 'draft' );
return $query_args;
}
add_filter( 'ppn_post_query_args', 'ppn_include_draft_posts' );
I hope that helps!
Thanks so much for your reply, but it doesnt seem to work, or i am putting the code in the wrong file, kindly advice which file to add the code. thanks
Well you have been helpful enough.
It works now with the code snippet plugin
Great! Glad to hear it. If you continue enjoying the plugin, please consider leaving a review to help others learn how it has been beneficial to you.