• Resolved Mikel

    (@ogmic)


    Hi, i would like to show a custom message to users that were exclude from the default point. Something that says ‘You are excluded” or “N/A”.

    I am currently using the [mycred_my_balance wrapper=0 title_el=”” balance_el=””] shortcode to display current user’s balance. But for exclude users, its blank.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello there,

    Hope you are doing well.

    You can try with include the following code within the ‘mycred_my_balance’ shortcode.

    if ( $mycred->exclude_user( $user_id ) ) {
    // Display a popup alert using JavaScript echo '<script type="text/javascript">alert("Your message goes here");</script>';}

    Let me know if you have any questions. We will help you out.

    Thanks

    Thread Starter Mikel

    (@ogmic)

    @daniyalraza01 Thanks for the help.
    How do i add this code to the shortcode?

    Thread Starter Mikel

    (@ogmic)

    I use the Gutenberg shortcode widget to render the shortcode [mycred_my_balance wrapper=0 title_el=”” balance_el=””]. Which widget will i use to render the code?

    You can place this code in your plugin file where the code is rendered based on your scenario or you can use code widget to render this shortcode.

    Let me know if any confusion you have.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display Custom Message for Excluded Users’ is closed to new replies.