Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author cubecolour

    (@numeeja)

    I’ve not tried this so I don’t know whether there is any reason for this not to work, however I think it should.

    The tab title is specified in the shortcode as the title arg. The content that appears when the tab is selected needs to be output beneath the tabby shortcode either directly or programmatically as it is not a part of the shortcode.

    The tabbyending shortcode will need to go after the content of the last tab.

    eg: (updated: edited to echo the output)

    <?php
    echo do_shortcode('[tabby title="Tab 1"]');
    
    ?>
    This is the content of the first tab
    <?php
    
    echo do_shortcode('[tabby title="Tab 2"]');
    
    echo do_shortcode('[someshortcode]');
    
    echo do_shortcode('[tabby title="Tab 3"]');
    
    somefunction();
    
    echo do_shortcode('[tabbyending]');
    
    ?>

    It may be more efficent to call the shortcode callback function directly rather than using do_shortcode().

    Thread Starter Dusza

    (@dusza)

    duh, i apparently had a brain fart. yes that did work. i was thinking the code needed additional parameters such as:

    do_shortcode('[tabby title="Tab 2" text="some text here"]');

    thanks, just purchased the plugin too ??

    Plugin Author cubecolour

    (@numeeja)

    I think my first development version worked similarly to that, but it caused too many problems with including some types of content.

    Not sure which plugin you’re referring to when you say you purchased the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘do_shortcode’ is closed to new replies.