Possible to inject HTML tags in single post template (default pro)?

Posted in: Newspaper
Post count: 36

Hi,

I’m trying to inject HTML tags around an element of the single post template (default pro). So far I’ve tried the single external shortcode element before (opening tag) and after (closing tag), but the tag gets closed right away on the front-end then. Can I maybe achieve this via a function on my child theme or edit some .php file to do this?

Thanks a bunch and best regards,
eC

Post count: 35449

Hi,
Maybe you can try the raw html element -> https://i.imgur.com/05A8vGr.png
Also, I’m not quite sure what you need to achieve, so if you can provide some more details, I will try to provide a better solution.
Thank you!

Post count: 36

Hi Calin,

thanks for your quick reply! RAW HTML does the same (opening and directly closing the tag). I’m using WebPExpress, and alter the HTML for my site via filtering hooks. By doing so, unfortunately, it doesn’t transform the featured image that automatically gets placed on top of an article (and also not the logo in the header / footer). So I was trying to wrap the featured image in a picture-tag, but I’m not sure if that will help anyways.
When I change to output buffering it works on the whole site, including featured image and logo. But then I have the problem that the logo is flashing when switching between pages, which doesn’t feel so smooth then anymore. Having CloudFlare (Free) as a CDN, so I can’t switch to replace image URLs.

Do you maybe have a solution / an idea how I can tweak this best?

Thanks again and best regards,
eC

Post count: 35449

Hi eCronik,
I believe that if is apply when the code is set before, then most possible to be only a problem of setting/configurating the code. Unfortunately, I do not know what code you should try, but if you want, please set the default post template and check to see if the code works better.
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.