Do_shortcode with cornerstone accordeon element feeded with external source

Hi,
In functions.php, I have generate a shortcode ‘A’ that :

  • fetch content from a external csv file
  • each row of the csv file is placed in a cs accordeon element (header + body)
  • I 'm using a loop and the cs accordeon shortcode (see example below) , one row => one accordeon and finally the do_shortcode

…But it doesn’t render if I call the shortcode A in a page in a cs raw content element :frowning:

here an example of the code , I would like to render
echo do_shortcode (’[cs_element_accordion _id=“x” ][cs_element_accordion_item _id=“x” ][cs_content_seo] {header text + body text} …

Thank you for your help and support,
Alex

Hi Alex,

Thanks for reaching out.
It is not very clear what exactly you are trying here. The Cornerstone shortcodes are not executable through the do_shortcode. If you still want it, I would suggest you add those as Componenets and add the component shortcode in the CSV file instead of the Cornerstone shortcode.
I would suggest you go through the following documentation on Components.

Hope it helps.
Thanks

Hi Tristup,
Thank you for the advise !
In fact, this video about loopers help me out !


Cheers,
Alex

You are most welcome, Alex.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.