Shortcode won’t 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!
- The topic ‘Shortcode won’t work in PHP’ is closed to new replies.