• Resolved botor

    (@botor)


    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

    (@arsalantariq)

    Hi @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

    (@botor)

    Thanks but the site is collapsed after put this code 🙁

    Plugin Author WPExperts.io

    (@wpexpertsio)

    @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.
Viewing 3 replies - 1 through 3 (of 3 total)

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