Title: Shortcode won&#8217;t work in PHP
Last modified: February 16, 2018

---

# Shortcode won’t work in PHP

 *  [bumblebeegames](https://wordpress.org/support/users/bumblebeegames/)
 * (@bumblebeegames)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/shortcode-wont-work-in-php/)
 * Hey guys.
    I’m pretty sure I’m doing something wrong here, maybe you can help.
   When I use [O_U]Hidden content[/O_U] from within a post (custom post type), all
   is working just fine. However, when I try to hide content (custom content generated
   by USP Pro on a post of the same custom post type) the shortcode is not being
   displayed (thus interpreted, I guess) but the hidden content shown nonetheless
   and followed by a readable [/O_U]. It seems as if the shortcode is getting canceled/
   ended before reaching the content. Here is my code:
 *     ```
       <?php echo do_shortcode( '[O_U user_name="test" blocked_meassage="To access additional information, request access to level 2."]' ); ?>
       <a href="<?php echo usp_get_meta(false, 'usp-custom-trailer'); ?>" target="_blank"><?php echo usp_get_meta(false, 'usp-custom-trailer'); ?></a>
       <?php echo do_shortcode('[/O_U]'); ?>
       ```
   
 * This is the result I get when rendering the page:
 *     ```
       To access additional information, request access to level 2. https://youtu.be/...
       [/O_U]
       ```
   
 * Thanks a lot!
    -  This topic was modified 8 years, 1 month ago by [bumblebeegames](https://wordpress.org/support/users/bumblebeegames/).

The topic ‘Shortcode won’t work in PHP’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/user-specific-content_ffffff.svg)
 * [User Specific Content](https://wordpress.org/plugins/user-specific-content/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-specific-content/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-specific-content/)
 * [Active Topics](https://wordpress.org/support/plugin/user-specific-content/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-specific-content/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-specific-content/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [bumblebeegames](https://wordpress.org/support/users/bumblebeegames/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/shortcode-wont-work-in-php/)
 * Status: not resolved