Title: HTML and PHP content between shortcode
Last modified: December 7, 2019

---

# HTML and PHP content between shortcode

 *  Resolved [nifel](https://wordpress.org/support/users/nifel/)
 * (@nifel)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/html-and-php-content-between-shortcode/)
 * Is it possible to have HTML and/or PHP between the shortcode?
    As of now, it 
   seems that you can only hide simple text.
 * Here is an example of what I mean:
 *     ```
       <?php echo do_shortcode('[passster password="4859"]') ?>
         <div>
           <p>Your content here</p>
         </div>
       <?php echo do_shortcode('[/passster]'); ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  [patrickposner](https://wordpress.org/support/users/patrickposner/)
 * (@patrickposner)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/html-and-php-content-between-shortcode/#post-12226619)
 * Hey [@nifel](https://wordpress.org/support/users/nifel/),
 * there are some conditional functions for that.
 * Maybe you check out this post: [https://wordpress.org/support/topic/php-add-shortcode/](https://wordpress.org/support/topic/php-add-shortcode/)
 * Best regards,
    Patrick

Viewing 1 replies (of 1 total)

The topic ‘HTML and PHP content between shortcode’ is closed to new replies.

 * ![](https://ps.w.org/content-protector/assets/icon-256x256.png?rev=2206760)
 * [Passster - Password Protect Pages and Content](https://wordpress.org/plugins/content-protector/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-protector/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-protector/)
 * [Active Topics](https://wordpress.org/support/plugin/content-protector/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-protector/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-protector/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [patrickposner](https://wordpress.org/support/users/patrickposner/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/html-and-php-content-between-shortcode/#post-12226619)
 * Status: resolved