WordPress.org

Ready to get started?Download WordPress

Forums

Show content only if member left a comment (1 post)

  1. 3gzotik
    Member
    Posted 1 year ago #

    Functions Php :

    add_shortcode( 'membervip', 'memberviparea' );
        function memberviparea( $atts, $content = null ) {
            if( is_user_logged_in() ) return '<p>' . $content . '</p>';
            else return;
        }

    Post :

    [membervip]Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.[/membervip]

    With this code I can show the links to only logged in members, but I want to only display the links for members who are logged in and have made a comment.

    What code can do this?

Topic Closed

This topic has been closed to new replies.

About this Topic