• Basically, I’d like to wrap a loop for a custom post type inside the shortcode. I’m not sure how to get this to work, though. A rough example of what I’d like to produce is here:

    echo do_shortcode('[youtubegallery]
      the_content()
      [/youtubegallery]'); ?>

    In the CPT, the content of the post is JUST the Youtube link and nothing else. The title of the video would be the title of the post. The shortcode doesn’t work if it’s entered like this:

    echo do_shortcode('[youtubegallery]');
      the_content();
      echo do_shortcode('[/youtubegallery]'); ?>

    If I use the second version, it will print the content of the post, but also prints [/youtubegallery] instead of interpreting it as shortcode.

    Is there a way to do what I’m looking for? Maybe I’m just missing something really simple.

    Thanks!

    https://www.ads-software.com/extend/plugins/youtube-simplegallery/

  • The topic ‘[Plugin: YouTube SimpleGallery] Using Shortcode the_content()’ is closed to new replies.