WPIntell

Source evidence

PDF from draft

Printable PDF Newspaper · support · 2021-03-29T07:06:00+00:00

mixedsentiment
mediumseverity
0.84relevance
6replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 36 rows with source links

16.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

30 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
spreaditunlimited resolved
Hello, Is it possible to print articles from drafts? We need to export to pdf before publishing. We want to make the print version available first for some time before making it available online. Thanks. 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 Unfortunately I’m not able to provide support for the details of how to add custom code to your site. These resources may be helpful: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/ https://www.skyverge.com/blog/add-custom-code-to-wordpress/ 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. done

Comments

6 shown
Chris Hardie 2021-03-29T12:50:00+00:00

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!

spreaditunlimited 2021-03-29T13:31:00+00:00

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

Chris Hardie 2021-03-29T13:38:00+00:00

Unfortunately I’m not able to provide support for the details of how to add custom code to your site. These resources may be helpful: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/ https://www.skyverge.com/blog/add-custom-code-to-wordpress/

spreaditunlimited 2021-03-29T13:54:00+00:00

Well you have been helpful enough. It works now with the code snippet plugin

Chris Hardie 2021-03-29T13:57:00+00:00

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.

spreaditunlimited 2021-03-29T14:16:00+00:00

done