-
AuthorPosts
-
March 4, 2022 at 10:50 pm #1343218
I would like to insert shortcodes into my pages that span multiple blocks. An example. Using the codeblock element, if I enter [restrict] it gets turned into:
[av_codeblock wrapper_element='' wrapper_element_attributes='' codeblock_type='' alb_description='' id='' custom_class='' template_class='' av_uid='av-l0cvpab0' sc_version='1.0']
[restrict]
[/av_codeblock]I do not want the shortcode wrapped at all, I just want to see “[restrict]” – is that possible?
I tried enabling:
Deactivate schema.org markup
Output the code without any additional wrapper elements. (not recommended)But that didn’t eliminate the wrapper. If I go to the Default Editor and type in the shortcode myself and then update the page, it works, but whenever I go back to the Avia Layout Builder, the code is rewritten.
How can I insert my own shortcodes within an Avia Layout Builder page and have them persist and not be wrapped?
Thanks!
March 6, 2022 at 9:01 pm #1343384Any response to this? I even tried creating my own custom element, but the layout builder insists on putting wrappers around whatever I try to insert. Isn’t there some way to just put some text into the output from Avia Layout Builder which will not be overwritten every time the editor runs?
March 7, 2022 at 5:17 am #1343433Hi,
Thank you for the inquiry.
How can I insert my own shortcodes within an Avia Layout Builder page and have them persist and not be wrapped?
This is not possible, unfortunately. You will have to use a text or code block, or any element with a text editor in order to insert a custom shortcode in the builder.
Best regards,
IsmaelMarch 7, 2022 at 6:59 am #1343437Where do you want to place the shortcode?
Is it always the same place? E.g. always in single posts each time before the content? etc.There are some filters (e.g.: avf_template_builder_content) or some hooks you can use to insert shortcodes via do_shortcode.
So if you could be a bit more specific about what you want to achieve, there might be a solution.March 8, 2022 at 6:31 am #1343563Hi,
@guenni007: The user is trying to wrap the shortcodes or content inside another custom shortcode to restrict their visibility. This is not possible in the builder by default.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.