Site logo

Archived topic

Sections: tags deleted in html tab

3 replies · Started by Alberto on March 17, 2020

Viewing posts 1–4 of 4

Hello
When I need to use de section feature is hard to work with html code. In this case, I'm trying with this code:

<div class="cont">
<a href="the_url" class="item"><figure><img src="the_image_url" /><figurecaption>The figure caption</figurecaption></figure></a>
<a href="the_url" class="item"><figure><img src="the_image_url" /><figurecaption>The figure caption</figurecaption></figure></a>
<a href="the_url" class="item"><figure><img src="the_image_url" /><figurecaption>The figure caption</figurecaption></figure></a>
</div>

First, I had to search for information and finally add remove_filter( 'the_content', 'wpautop' ); to my functions.php
When I publish the post it looks good, but when I edit it, the <a> tags have disappeared and everything is broken.

Can you tell me how to avoid this type of behavior?

Thanks

Hi there,

it could be WordPress rejecting invalid HTML - in the above example <figurecaption> is not valid - it should be <figcaption>

Hi David
Thanks a lot for your reply!
Ooops!, you're right. It seems it's working fine now.

Thank you!

You're welcome :)

This archived topic is closed to new replies.