WordPress.org

Ready to get started?Download WordPress

Forums

Shortcode in do_shortcode (4 posts)

  1. ktrusak
    Member
    Posted 1 year ago #

    Is it possible to execute a shortcode within do_shortcode?

    As in : <?php echo do_shortcode('[shortcode1].[shortcode2].[/shortcode1]');?>

    I can't seem to get the syntax right

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    Create a new function, use add_shortcode, call function where needed.

    Source.

  3. ktrusak
    Member
    Posted 1 year ago #

    Thanks for the link, looks good

  4. ktrusak
    Member
    Posted 1 year ago #

    Actually this tutorial doesn't quite address by problem. This tutorial basically combines two shortcodes to execute with a single function.

    My problem is trying to insert one shortcode within an opening and closing shortcode. Even with making a new function I still am stuck on not knowing how to put [shortcode2] within [shortcode1] with php

Topic Closed

This topic has been closed to new replies.

About this Topic