Hello,
I know what it seems this is doing can be done using the page builder. But I need to create a custom shortcode as I am dynamically getting the content.
I need to create a custom shortcode using the existing shortcodes from the Newspaper theme. But when I add the content and call do_shortcode() I get the error in the Composer/cloud template builder.
Errors at columns elements: 15(models) : 16(dom). The model does not match the content Current state has involved an issue. You could try an UNDO operation (CTRL+Z / CTRL+SHIFT+Z)
Below is a minimum example of the code:
function custom_shortcode() {
$output = do_shortcode('[tdm_block_socials social_rel="nofollow" tds_social="tds_social3" facebook="https://www.facebook.com/TagDiv/"]');
return $output;
}
add_shortcode('te_social_links', 'custom_shortcode');
How can I update this so I do not get the error and can work with Composer. Additionally where can I also find hooks for the other shortcodes so I can dynamically add the values.
Thank you
Hi Anamaria,
I have a ACF field on posts that have social links related to each page. In this example I am trying to display them on the page, which works fine but I can access the Composer due to the error. I have to comment out the do_shortcode() line change the template then re-enable it.
I have provided a limited version of the code so you can recreate the problem. The shortcode is added via composer to the page template as a ‘Single External Shortcode’ from composer.
Thank you
I did add it as Column Text and it works in Laptop/ Desktop: See https://www.pgurus.com. Now see the same thing on a Smartphone, and this shortcode does not show up! 95% of my viewers consume our content on a Smartphone! How do I get it to work on a Smartphone? I am using Newspaper Theme V12.6.2.
Thanks in advance
-
This reply was modified 2 years by
Mystic.