• Resolved Manish

    (@nims)


    I wish to use the accordion code in theme file.

    I know I need to use

    <?php echo do_shortcode('[your_shortcode]'); ?>

    But I am confused on how to add the content within opening and closing of the shortcode. Kindly suggest.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andy Feliciotti

    (@someguy9)

    @nims you should be able to do

    <?php echo do_shortcode('[lightweight-accordion title="My Accordion"]My Content[/lightweight-accordion]'); ?>
    Thread Starter Manish

    (@nims)

    Thanks for the prompt reply. Are you sure I can add multiline content within that with formatting intact ?

    Plugin Author Andy Feliciotti

    (@someguy9)

    @nims I’d recommend using html to add formating <p> </p> <br> etc.

    Thread Starter Manish

    (@nims)

    ok thanks

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘How to use shortcode in theme files’ is closed to new replies.