Hide This Part
[resolved] How to use this shortcode in theme? (2 posts)

  1. PinkishHue
    Posted 4 years ago #


    I would like to use this in my theme rather than in a post. I understand how to do this with some shortcodes, but with a shortcode such as this with a beginning and end - where do I add the content that should be displayed within the shortcode?

    Here is what I have:

    <?php echo do_shortcode('[hide-this-part]'); ?>

    I have been hunting for the answer for an hour but it appears this is not something widely discussed.

    Many thanks for any help anyone can give me!



  2. PinkishHue
    Posted 4 years ago #

    Sorry, I'm silly! Figured it out in case anyone else is interested:

    <?php echo do_shortcode('[hide-this-part]my text here[/hide-this-part]'); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Hide This Part
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic