Title: PHP integration
Last modified: August 23, 2022

---

# PHP integration

 *  Resolved [botor](https://wordpress.org/support/users/botor/)
 * (@botor)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-integration-4/)
 * Hello Guys,
    I need a little help for a follow: I have a submission popup on 
   my page and i would like to hide some content if the users not have enough points.
   But im not a php professional cooding man 🙂 I would like tu use tis code: <?
   php echo do_shortcode( ‘[mycred_show_if balance=100]I want the follow content
   here….[/mycred_show_if]’ ); ?> and this is a content: <div class=”data-item”>
   <button name=”submit” type=”button” class=”loadmore-btn beeteam368_post-add-control”
   > <span class=”loadmore-text loadmore-text-control”><?php echo esc_html__(‘Create
   Post’, ‘beeteam368-extensions-pro’);?></span> <span class=”loadmore-loading”>
   <span class=”loadmore-indicator”> <svg><polyline class=”lm-back” points=”1 6 
   4 6 6 11 10 1 12 6 15 6″></polyline> <polyline class=”lm-front” points=”1 6 4
   6 6 11 10 1 12 6 15 6″></polyline></svg> </span></span></button></div>
 * I try this but unfortunately not working 🙁
 * <?php echo do_shortcode( ‘[mycred_show_if balance=100]<div class=”data-item”>
   
   <button name=”submit” type=”button” class=”loadmore-btn beeteam368_post-add-control”
   > <span class=”loadmore-text loadmore-text-control”><?php echo esc_html__(‘Create
   Post’, ‘beeteam368-extensions-pro’);?></span> <span class=”loadmore-loading”>
   <span class=”loadmore-indicator”> <svg><polyline class=”lm-back” points=”1 6 
   4 6 6 11 10 1 12 6 15 6″></polyline> <polyline class=”lm-front” points=”1 6 4
   6 6 11 10 1 12 6 15 6″></polyline></svg> </span></span></button></div>[/mycred_show_if]’);?
   >
 * Maybe somebody can to help me 🙂
    Big thanks. Chris

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [A.Tariq](https://wordpress.org/support/users/arsalantariq/)
 * (@arsalantariq)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-integration-4/#post-15941764)
 * Hi [@botor](https://wordpress.org/support/users/botor/),
 * Thank you for contacting us, Please use the below shared code also do let us 
   know how it is working for you.
 *     ```
       $text_to_be_wrapped_in_shortcode = '';
   
       $text_to_be_wrapped_in_shortcode .= '<div class="data-item">';
       $text_to_be_wrapped_in_shortcode .= '<button name="submit" type="button" class="loadmore-btn beeteam368_post-add-control">';
       $text_to_be_wrapped_in_shortcode .= '<span class=”loadmore-text loadmore-text-control”><?php echo esc_html__('Create Post', 'beeteam368-extensions-pro');?></span>';
       $text_to_be_wrapped_in_shortcode .= '<span class="loadmore-loading">';
       $text_to_be_wrapped_in_shortcode .='<span class="loadmore-indicator">';
       $text_to_be_wrapped_in_shortcode .= '<svg><polyline class="lm-back" points="1 6 4 6 6 11 10 1 12 6 15 6"></polyline> <polyline class="lm-front" points="1 6 4 6 6 11 10 1 12 6 15 6"></polyline></svg>
       </span></span></button></div>';
   
       echo do_shortcode('[mycred_show_if balance=100]' . $text_to_be_wrapped_in_shortcode . '[/mycred_show_if]');
       ```
   
 * `
 *  Thread Starter [botor](https://wordpress.org/support/users/botor/)
 * (@botor)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-integration-4/#post-15944727)
 * Thanks but the site is collapsed after put this code 🙁
 *  Plugin Author [WPExperts.io](https://wordpress.org/support/users/wpexpertsio/)
 * (@wpexpertsio)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-integration-4/#post-15945768)
 * [@botor](https://wordpress.org/support/users/botor/),
 * Please try using the below shared code.
 *     ```
       $text_to_be_wrapped_in_shortcode = '';
   
       $text_to_be_wrapped_in_shortcode .= '<div class="data-item">';
       $text_to_be_wrapped_in_shortcode .= '<button name="submit" type="button" class="loadmore-btn beeteam368_post-add-control">';
       $text_to_be_wrapped_in_shortcode .= '<span class="loadmore-text loadmore-text-control">Create Post</span>';
       $text_to_be_wrapped_in_shortcode .= '<span class="loadmore-loading">';
       $text_to_be_wrapped_in_shortcode .='<span class="loadmore-indicator">';
       $text_to_be_wrapped_in_shortcode .= '<svg><polyline class="lm-back" points="1 6 4 6 6 11 10 1 12 6 15 6"></polyline> <polyline class="lm-front" points="1 6 4 6 6 11 10 1 12 6 15 6"></polyline></svg>
       </span></span></button></div>';
   
       echo do_shortcode('[mycred_show_if balance=100]' . $text_to_be_wrapped_in_shortcode . '[/mycred_show_if]');
       ```
   
 * `
    -  This reply was modified 3 years, 9 months ago by [WPExperts.io](https://wordpress.org/support/users/wpexpertsio/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP integration’ is closed to new replies.

 * ![](https://ps.w.org/mycred/assets/icon-128x128.gif?rev=3512531)
 * [Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program - myCred](https://wordpress.org/plugins/mycred/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mycred/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mycred/)
 * [Active Topics](https://wordpress.org/support/plugin/mycred/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mycred/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mycred/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [WPExperts.io](https://wordpress.org/support/users/wpexpertsio/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/php-integration-4/#post-15945768)
 * Status: resolved