Viewing 1 replies (of 1 total)
  • Plugin Author philbuchanan

    (@philbuchanan)

    It’s best to use the shortcodes in the content editor. You should aim to keep your theme free from site specific content.

    That said, you can use the do_shortcode() function to evaluate shortcodes in a template file. Something like this should work:

    <?php echo do_shortcode('[tabs]
    [tab title="First Tab"]Content for tab one goes here.[/tab]
    [tab title="Second Tab"]Content for tab two goes here.[/tab]
    [tab title="Third Tab"]Content for tab three goes here.[/tab]
    [/tabs]'); ?>

    View the documentation for more details.

Viewing 1 replies (of 1 total)
  • The topic ‘Getting the shortcode to work in index.php’ is closed to new replies.