N
N
NewUser42422020-08-27 15:57:19
WordPress
NewUser4242, 2020-08-27 15:57:19

Post preview as PDF?

There are cards that are generated from posts on wp and there is a photo that can be added in the admin panel. And there is a button by clicking on which opens the PDF, the customer wants a preview of the PDF file that is added below instead of the photo. Well, as a preview, as I understand it, just the file is just the size of the photo. What would the photo look like. How is this implemented?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima, 2020-08-27
Dolgoter @SpiderPigAndCat

if the task is like "when displaying a bunch of posts, I want to click on one and go directly to pdf"
then the solution is
- with acf
make a field in which you either select a pdf or just a link to the pdf and in the records archive (where all posts are displayed as previews) do a link in which the href contains the path to pdf, and the content is a regular preview (the same photo that needs to be added to the entry)
- without acf,
insert the link to pdf in the usual content field (only you need to remove the wrapper from there. this is done if you select tab " text")
then make a link in which the href is the_content() and the content is a regular preview (the same photo that needs to be added to the post)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question