How to create page for user?

Is there a reason why you don’t just want to make the “author archive” a page and list them all on the page with a shortcode ? If that’s an option, simply put your single author template in author.php Author templates – Template hierarchy If not, you could take your current template (that you’ve put … Read more

How can i display pagination in custom comment list?

You should use append paginate_comments_links() into $output like so: add_shortcode ( ‘show_recent_comments’, ‘show_recent_comments_handler’ ); function show_recent_comments_handler( $atts, $content = null ) { extract( shortcode_atts( array( “count” => 20, “pretty_permalink” => 0 ), $atts )); $output=””; // this holds the output if ( is_user_logged_in() ) { global $current_user; get_currentuserinfo(); $args = array( ‘user_id’ => $current_user->ID, ‘number’ … Read more

Gender based user avatar

I managed to come up with the answer 😀 Thanks to @Jos function ht1_change_avatar($args, $id_or_email) { $gender = get_user_meta($id_or_email, ‘user_gender’, true); if($gender==’Male’){ $myavatar=”http://localhost:81/matrimony/wp-content/uploads/2020/04/groom.png”; }else{ $myavatar=”http://localhost:81/matrimony/wp-content/uploads/2020/04/bride.png”; } $args[‘url’] = $myavatar; return $args; } add_filter(‘get_avatar_data’, ‘ht1_change_avatar’, 100, 2);

how to create user profile pages and display them based on users roles

Try this to get you started. This creates a shortcode [alldevelopers] that displays a list of all developers. Pretty basic but can be heavily extended and duplicted. (Not tested) add_shortcode( ‘alldevelopers’, ‘show_all_developers’ ); function show_all_developers(){ $users = get_users( [ ‘role__in’ => [ ‘developers’ ] ] ); foreach ( $users as $user ) { echo $user->first_name … Read more

I need a link that directs the user that is logged to his profile

You said that KingComposer will accept PHP blocks. This will generate a link to the current logged-in user’s author page: <?php $author_page = is_user_logged_in() ? get_author_posts_url( get_current_user_id() ) : NULL; $acc_pay_page = $author_page ? add_query_arg( ‘screen’, ‘acc_pay’, $author_page ) : NULL; if ( $acc_pay_page) { echo ‘<a href=”‘ . esc_url( $acc_pay_page ) .'”><img src=”account_page_page.png” /></a>’; … Read more