Hello @axiom28,
Sorry for reply that late!
So, on this page https://chemprotech.co.za/wp/process-presentations/ I see that you list 3 blog posts, and the site shows the “preview” of the blog post content.
1st one shows the [pdf-embedder] shortcode, while the other 2 don’t show that.
I think this might be related to the Excerpt.
By default, most of themes are trying to display the post excerpt if it’s present. So maybe your 2nd and 3rd blog post has some excerpt. But the first one does not have it.
Or you put your shortcode inside the excerpt area of the post.
I would recommend putting a meaningful excerpt text in the Excerpt field on the blog post editing page. This way, the theme should pick it up and display that instead of a not-rendered shortcode (which is a default behavior when the theme displays the excerpt).
Here is a related article from a 3rd party site that can hep you understand a bit more how things are working: https://kinsta.com/knowledgebase/wordpress-excerpt/
Our shortcode should be put into the post content, not excerpt.
Let me know if that helps.
I am sorry I disagree with you, that is not the issue, did you look at each document, they are scientific references and are laid out in the same way, there is very little difference. The short code created by your plugin is the content in all cases. I even tried rearranging them and the same document did the same thing no matter where it was placed.
In the two that are showing correctly there is no exert on the blog title, the faulty one shows the title and the shortcode.
Take a look at the documents, they do open as they should, can you see a difference that would cause this?
Ian
I’m afraid I don’t understand the problem then.
There are 3 blog posts with 3 different PDF documents embedded into them with a shortcode. All 3 shortcodes are correctly rendering the PDF Viewer with those PDF files, which is the main purpose of the plugin.
This page – https://chemprotech.co.za/wp/process-presentations/ – is an archive of those 3 blog posts. On the archive page there are 3 ways how you can display the post content:
- using the full post content
- using the predefined by a user excerpt that you modified when editing those blog posts
- using the auto-generated excerpt – usually X amount of first characters from the post content.
All these 3 ways depend on your theme and the PDF Embedder plugin has nothing to do with how the theme renders the archive page and all the shortcodes on the archive (or index) page.
If you want to render the 2nd and the 3rd post on your archive page the same way as the 1st page, you need to:
- make sure your theme doesn’t have special rules for the 1st post on the archive page
- modify the post excerpt in 2nd and 3rd posts the same way you did for the 1st post
I hope this helps.
Hello, thank you for your reply, I do understand but I find it strange that it works for 2 documents but not the third. Anyway I tried your first suggestion of adding an exerpt and that did work, but there was no exrpt in the other two so I added one for each of them so they looked consistent. However, I read what you said and I will check with Divi support regarding the theme rules. Although in the case of blogs I don’t normally use the builder.
Let’s see what they have to say.
Ian