-
BrunoVincent.net
For some reason, I have a block with an h1 on top and then an h2 under it, but the h2 nests the content into a P tag…
Here is the code:
<div class="gb-element-bb0ec8ff"> <h1 class="gb-text gb-text-2a97ccf1 XL-H1">Youtube Videos</h1> <h2 class="gb-text" id="XL-H2"><p>This is the youtube videos description</p> </h2> </div> -
Hi there,
Is the h2 dynamically pulled? Can you let me know how did you set up the dynamic tag for the h2? What dynamic data are you trying to pull?
Let me know 🙂
-
BrunoVincent.net
It’s dynamic data yes, here is the code:
<div class="gb-element-6524c67d header-colors"> <div class="gb-element-bb0ec8ff"> <h1 class="gb-text gb-text-2a97ccf1 XL-H1">Fast Cars</h1> <h2 class="gb-text" id="XL-H2"<p><This is the fast cars category</p> </h2> </div> </div> -
Alvind
Hi there,
What is the field type of the ACF field from which you are pulling that dynamic data?
-
BrunoVincent.net
It’s not a custom field, it’s a taxonomy description dynamic field:
{{archive_description}}
-
Alvind
It looks like a bug — by default, the value returned by the function includes the
<p>tag.For now, you can use this filter to fix it:
add_filter('get_the_archive_description', function($description) { $description = str_replace(array('<p>', '</p>'), '', $description); return $description; });Adding PHP: https://docs.generatepress.com/article/adding-php/
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.