Hi,
On the English version of my site, when I put code in a block of code, it disappears as soon as I save the page.
On the French version (the first one I created), everything is OK.
(I use WPML.)
Thanks for your help.
Eric
Hey Eric,
Thank you for the inquiry.
What code are you trying to add to the Code Block element? Please post the code on pastebin.com. Also, please note that script or input tags can cause issues with the layout builder, so it’s not recommended to add them directly to the editor.
Best regards,
Ismael
Hi,
Thank you for the inquiry.
You may need to create a custom shortcode for the html tag instead of adding it directly to the builder. Please add this code in the functions.php file:
function avs_ctv_searchbar_shortcode( $atts ) {
$html = '<ctv-searchbar></ctv-searchbar>';
return $html;
}
add_shortcode( 'avs_ctv_searchbar', 'avs_ctv_searchbar_shortcode' );
In the code block element, use this shortcode:
[avs_ctv_searchbar]
For more info, please check the documentation below:
// https://codex.wordpress.org/Shortcode_API
Best regards,
Ismael
Thank you very much Ismael for your solution. Everything is in order now thanks to you.
Best regards, Eric