Hello,
I’d like to add a custom shortcode content to my homepage created with Composer.
What’s the best way?
Hello,
A shortcode can be inserted by using the element called “Column text” or “Text with title”. “Column text” and “text with title” elements have a button called “edit content” and if you click on that button, the WP Editor will open, and you can add some text/code/shortcode there. Close the WP Editor from X, save the changes from Composer and view the page to see the changes.
Thank you!
Ok thank you. The shortcode must been defined in the functions.php file of the theme, right?
It’s a custom shortcode made by me in the old theme I used.
Sorry, not really. It’s a complex script to get content from other sources (external db). I was just interested to know how to inject it in the page via Composer, thank you.
Hello Anamaria,
I followed your instructions using a column text for my custom shortcode. It seems to work fine, but the html generated by the shortcode appears at the top of the page and not in the position where I inserted the column text.
You can see it here https://nuovo.cronachedibirra.it/home-2-2/
I put the column text just before the black “Most popular” box, but its content is rendered at the top of the page. The shortcode only generates an html list (ul, li) and it’s not formatted via CSS.