Multiple content Meta field

18 October, 2021 08:39:12
ACM
Topics: 9
Messages: 35
Hello,
With your module I want to generate a pdf file in "loop" I explain myself:
I have one content type "Internships" and another "Interns"
I would like to generate a file for each Intern of the Internship in question.
I understood that it was necessary to use: "[e2pdf-wp key =" trainees "path =" 0.name "meta =" true "]" as in the doc but it does not work.
If I remove the path it returns me a json format and if I understand correctly it would have to be an "array" for it to return the true value, right?
How to solve it?
18 October, 2021 08:43:06
E2Pdf
Support
Topics: 7
Messages: 3335
Hi,

Can you please attach screenshot with "textarea" with mapped field as: [e2pdf-wp key="trainees meta="true"] rendered inside PDF or copy the json value which is rendered to next message.

P.S. You can mark message "Private" so only support and you can see the message.
We would really appreciate your feedback at WordPress.org!
18 October, 2021 08:56:34
ACM
Topics: 9
Messages: 35
I have try with this and is working
[e2pdf-wp key="stagiaires" index="0" path="post_title" meta="true"]

But i Can't return the meta inside stagiaires content only main element of posts

Is possible to return meta ?

Second, I will want to generate as many pages on my pdf as there are "Interns" in my internship content type.
how to do this ?
18 October, 2021 09:13:24
E2Pdf
Support
Topics: 7
Messages: 3335
Do you see "stagiaire" Post ID with this shortcode [e2pdf-wp key="stagiaires" index="0" path="post_title" meta="true"]? Or it's still json output? If json output do you see the anything that can look like "stagiaire" Post ID and can you navigate to it via "path"?

If you will be able to get only Post ID of "stagiaire" from this shortcode it must be possible to accomplish the task.


We would really appreciate your feedback at WordPress.org!
18 October, 2021 23:19:46
ACM
Topics: 9
Messages: 35
Hello Yes You can seee the screen.

And now how to load the post meta (prenom) about the post_id : 688 ?

18 October, 2021 23:49:10
E2Pdf
Support
Topics: 7
Messages: 3335
Hi,

Are you sure that it can contain more posts under [e2pdf-wp key="stagiaires" meta="true"] meta field? "index" attribute actually must have no effect and you are getting only 1 post data in response. In general if the screenshot that you attached is the output of [e2pdf-wp key="stagiaires" meta="true"], you can use the following construction to get meta data of post 688:

[e2pdf-wp id="dynamic" key="somemeta" meta="true"][e2pdf-wp key="stagiaires" meta="true" path="ID"][/e2pdf-wp]

P.S. If it will be used some other [e2pdf-wp] shortcodes inside SAME element, they will be need to be ALL closed, even if they outside as:

[e2pdf-wp id="dynamic" key="somemeta" meta="true"][e2pdf-wp key="stagiaires" meta="true" path="ID"][/e2pdf-wp] [e2pdf-wp key="post_title"][/e2pdf-wp]

P.P.S. For multiple pages (if you need it) - it must be used "Actions" and "Conditions", however all pages must be pre-mapped and created and you need to detect if some value is exists and if no - then "hide" page. Screenshot attached.

We would really appreciate your feedback at WordPress.org!
19 October, 2021 00:43:33
ACM
Topics: 9
Messages: 35
Okay Tanks but this like not working

[e2pdf-wp id="dynamic" key="prnom" meta="true"]
[e2pdf-wp key="stagiaires" meta="true" path="688"]
[/e2pdf-wp]
19 October, 2021 00:46:11
E2Pdf
Support
Topics: 7
Messages: 3335
It must be:

[e2pdf-wp id="dynamic" key="prnom" meta="true"]
[e2pdf-wp key="stagiaires" meta="true" path="ID"]
[/e2pdf-wp]

"path" navigates via json array so it must be ID, not 688.

If it will not work, check please if current shortcode will work to confirm that you are using correct meta key: [e2pdf-wp id="688" key="prnom" meta="true"]
We would really appreciate your feedback at WordPress.org!
19 October, 2021 01:38:09
E2Pdf
Support
Topics: 7
Messages: 3335
Your shortcode: [e2pdf-wp key="stagiaires" meta="true" path="ID"] - seems output only one Page ID. How are saved other Post IDs which you need to get?

In general you need to prepare all possible pages with mapped shortcodes and it must be used "Actions" and "Conditions", to detect if some value not exists (if it will be less entries) - then "hide" page. Screenshot attached.

But you are using incorrect shortcode to get child posts or it has different output when multiple posts connected...

If it's acceptable for you, you can submit support ticket with access details to your WP Admin Dashboard so we can check it directly on your website. You can submit ticket here: https://e2pdf.com/support/request. If not, if you will have multiple "stagiaires" - will it output other posts data when it's used [e2pdf-wp key="stagiaires" meta="true"] shortcode?


We would really appreciate your feedback at WordPress.org!