Home Forums Plugin Support WP User Frontend Pro If 0 credits…then display this

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  Tareq Hasan 6 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1662

    ronilagin
    Participant
    Post count: 24

    Hi,

    Can you assist with writing a conditional statement that says if user's credits are 0, display this, if anything more than 0, display that.

    Much appreciated!  Your plugin rocks 🙂

    #1663

    Tareq Hasan
    Keymaster
    Post count: 2831

    May be thats what you need
    [php]
    $post_count = get_user_meta( get_current_user_id(), ‘wpuf_sub_pcount', true );
    $post_count = $post_count ? intval( $post_count ) : 0;

    if ( $post_count ) {
    echo ‘You have post left: ‘ . $post_count;
    } else {
    echo ‘Post count is empty';
    }
    [/php]

    If you like the plugin, perhaps you could give us a testimonial that we can stick into the plugin page? 😀

    #1686

    ronilagin
    Participant
    Post count: 24

    I would be happy to leave a testimonial as long as you don't get upset with all my questions! 😉

    #1690

    Tareq Hasan
    Keymaster
    Post count: 2831

    🙄

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘If 0 credits…then display this’ is closed to new replies.