• Resolved milton1995

    (@milton1995)


    Hello,

    I am currently using your pro version in my website right now…
    i would like to know if you could help me with some stuff..

    1.) I would like to to add a feature on the comment system of wordpress where-in we could make the username of people who commented on a post clickable and goes to somebody’s profile (profile page made pagebuilder plugin)
    -Currently using Disqus Plugin for Comment System but can be change or back to original.

    2.) I would like to make a button or a menu on my page where-in when that button is click it would go directly to its own Profile Page…
    is this achievable?

    I hope this all makes sense…
    i have also tried emailing you via ticket

    Cheers,
    Jan

    https://ww.wp.xz.cn/plugins/profile-builder/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Razvan Mocanu

    (@razvanmo-1)

    Hello,

    I replied to your ticket submitted in our support system, but will also post the solutions here, for anyone else needing similar solutions:
    1.

    add_filter ( 'get_comment_author', 'link_comment_author_to_user_profile' );
    function link_comment_author_to_user_profile( $author){
    
    	$userlisting_page = 'userlisting';
    
    	global $pagenow;
    	if ( $pagenow != 'edit-comments.php' ) {
    		$user = get_user_by('login', $author);
    		if( $user != false ){
    			return '<a href="' . site_url('/') . $userlisting_page . '/user/' . $user->ID . '/" > ' . $author . '</a>';
    		}
    	}
    	return $author;
    }

    2. Usage: place shortcode [pb_view_my_profile]

    add_shortcode('pb_view_my_profile', 'wppbc_view_my_profile');
    
    function wppbc_view_my_profile(){
    	$userlisting_page = "user-list"; //page slug where you placed the User Listing shortcode.
    	$user_id = get_current_user_id();
    	if($user_id != 0) {
    		$link = site_url('/') . $userlisting_page . '/user/' . $user_id;
    		return "<a href='$link'>View my profile</a>";
    	}
    }

    Thread Starter milton1995

    (@milton1995)

    Talks we’re done professionally over the email…
    Thank you for the responsive support over the plugin!

    Going to give you a review now 🙂

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Pro Version Support?’ is closed to new replies.