Viewing 1 replies (of 1 total)
  • hellsdells

    (@hellsdells)

    Hi David
    A few months late but I thought I’d past this up here in case anyone was trying to do similar. I got the guts of the code from here

    https://stackoverflow.com/questions/11397441/how-to-insert-php-between-shortcodes-for-tabs-tab

    Basically what you want to do is

    ob_start();
    get_template_part('template-parts/grid-listing-container');
    $gridlist = ob_get_clean();
    
    echo do_shortcode('[CBC show="y" country="ie"]'.$gridlist.'[/CBC]');

    Where “grid-listing-container” is my template part and “$gridlist” is its ID I’m calling in.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding php between the opening and closing tags’ is closed to new replies.