Site logo

Archived topic

Random empty p in WordPress sidebar with shortcode

6 replies · Started by Kees on August 9, 2022

Viewing posts 1–7 of 7

Hi,

when we add a shortcode block to a widget. I makes random an empty p in the source.
How doe we solve this. See video in private

Now, i added a title above. And then it is fixed.

Hi there,

yeah, empty p's are a pain, could be the way the shortcode is outputting its content.

To stop them from creating empty space you can add this CSS:

p:empty {
    display: none;
}

Hi,

Thanks, its ok for now. But i have another question: https://discover.lamperbouw.nl/historisch-landschap/ if you inspect the category and tags in the loop. You see this rel: category tag. But on the homepage we styled on specific classes like: term-historisch-landschap.

Is there a way to add the cat/tag class to this span/div?

Ok, so it looks like a Block Element - Content Template is being used there.
If you edit that, and instead of using the GP Dynamic Data options, use the GB Dynamic data ( from the sidebar ) then your List of Terms will be output with those Term Classes.

Thanks!

Glad to be of help!

This archived topic is closed to new replies.