Site logo

Archived topic

Shortcode Wrapping Block in Elements is inserting P tags

4 replies · Started by Clayton on August 6, 2021

Viewing posts 1–5 of 5

Hey guys,

I'm using GeneratePress elements to create a custom template. Everything is working as expected until I use a shortcode from the Restrict Content Pro plugin to wrap the buttons. When I wrap GenerateBlocks buttons block with the [restrict] shortcode it inserts p tags in the button html thus changing the way the button looks.

Do you have any ideas as to why this might be happening but only when the button block is wrapped in a shortcode or how to fix?

Here is a screenshot: https://dropover.cloud/efcc65

Hi there,

When I wrap GenerateBlocks buttons block with the [restrict] shortcode

I'm not sure what you meant by this or why that is needed here?

Does the same issue happen if you wrap a core buttons block instead?

Hey Leo,

Basically I'm hiding some of the buttons based on the membership (via Restrict Content Pro) of the current user. That is why I need to wrap the block in the shortcode.

The issue doesn't seem to be happening with the default WordPress block.

I'm not sure if the issue is related to GP Elements or GP Blocks but it seems to be related to something GP related since the default WP blocks are fine.

Screenshot link of buttons: https://dropover.cloud/331969
Screenshot link of Restrict Content Pro response: https://dropover.cloud/8212aa

I was able to get around it with CSS. Thanks anyway.

Glad to hear :)

This archived topic is closed to new replies.