How can i put all the posts available in a pdf. instead calling just one post by ID.

WordPress
13 January, 2022 21:59:26
rameeshm
Topics: 3
Messages: 6
I want a pdf file export option with all the posts available in a custom post type. currently, I can export a single post by calling its ID.

I have a website with unit listings, if someone books a unit that unit will be removed from listings. so I want an option to download a pdf file with all available units. how can I set up that?


Thanks in advance.
13 January, 2022 23:36:53
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

There are experimental shortcodes which seems must accomplish the task: [e2pdf-foreach] and [e2pdf-wp-posts]

The usage will look like this:

[e2pdf-foreach shortcode="e2pdf-wp-posts" post_type="page" order="ASC" numberposts="999"]
[e2pdf-wp key="post_title" id="[e2pdf-foreach-value path='ID']"]
[/e2pdf-foreach]


[e2pdf-foreach shortcode="e2pdf-wp-posts" post_type="page" order="ASC" numberposts="999"] - can accept arguments to filter posts based on WordPress "get_posts" function: https://developer.wordpress.org/reference/functions/get_posts/

Attributes: category, include, exclude, post_mime_type - can accept comma separated values.

We remain at your service.
We would really appreciate your feedback at WordPress.org!