NO BUG: Unable to style one of two <p> elements in Hero Section

Browser: Brave browser v1.75.180
OS: Windows 10
URL: Belize Travel Tips – Untame Belize Tours & Transfers
Video: Short screen recording that illustrates this issue (free tool: jam.dev)

Screenshots:



I have experienced this issue on several builds. In the hero section, mostly happens on archive pages, where I am using one template for both the blog archive and the category archives using conditions to display the content for each, I am unable to put two

paragraph elements in the hero section and style them individually. For the second

element in the hero, it is not accepting/saving my style. It is not a caching issue as this site doesn’t have any caching mechanisms, and it’s not the browser as I’ve inspected with other browsers as well. I find it quite interesting why this behavior.

Any help would be appreciated!! thank you.

it’s probably that you have broken HTML. From looking at the source code in your screen shot, the p tag doesn’t actually exist inside the text element on the front end (which is why it’s not picking up the styling from the text element ID), so first thing to check would be if the description being added contains it’s own p tags. This would explain the broken markup if it does.

1 Like

what could cause that? I see an empty

in the html , if you can take a look at the link I added.

I checked my category descriptions and they arent wrapped in p tags. I am cutting them, pasting them to a text cleaner and bringing them back in to WP and seems to not fix the issue either…

ok, for some odd reason, if I change the element’s html to DIV instead of P, the styling is correct and its wrapped in a

correctly. But that introduced a

wrapper on the element which I didn’t want, trying to keep things as clean as I can…

is that just how category descriptions gets outputted by default or ?

Yeh, looks like the WP function that gets the archive description ( get_the_archive_description ) already includes a p tag by default.

1 Like

thanks a lot for helping me figure this out David!!