WordPress.org

Support

Support » Plugins and Hacks » Show content only if member left a comment

Show content only if member left a comment

  • 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?

  • The topic ‘Show content only if member left a comment’ is closed to new replies.
Skip to toolbar