Multiple Unique Author Profiles

You could register a user_meta field (probably a dropdown) and use that to select templates. You will still need to use if statements to differentiate the templates, but you’re going to need that regardless of the route you take. If you use get_template_part() you can split out the actual html and such of it and … Read more

Same email for all comments

Just change to to address for these emails. Sample code, not tested: // hook in late, to avoid side effects. add_filter( ‘comment_notification_headers’, ‘wpse_73855__change_comment_notify_to’ ); function wpse_73855__change_comment_notify_to( $input ) { if ( ‘comment_notification_headers’ === current_filter() ) { add_filter( ‘wp_mail’, __FUNCTION__ ); return $input; } $input[‘to’] = get_option( ‘admin_email’ ); remove_filter( current_filter(), __FUNCTION__ ); return $input; }

Make user as Default contributor for all Blog Posts

It sounds like you want to change the Author for existing posts. If this is the case, in your Admin screen, go to Posts | All Posts and place a checkmark next to whichever posts you want to reassign the Author. Then, near the top, in the Bulk Actions dropdown, select Edit and click Apply. … Read more

How to give capability (publish contributors posts) to author role?

I think that the best approach is to add the edit_other_posts capability to “author” role in plugin/theme activation and remove that capability on plugin/theme deactivation. With this method you only run the task once and you don’t need further coding. Using plugin activation/deactivation: register_activation_hook( __FILE__, ‘cyb_activation_function’ ); function cyb_activation_function() { $author = get_role( ‘author’ ); … Read more

Getting the author name on author archive page

I don’t know what are you trying to do with if-else statement, but to display author name with their published post link use this code: <span>Article posted by <?php the_author_posts_link(); ?></span> Tweak it according to your need. One more thing: You need to call the_author_posts_link() function within the while loop (Yes, the same while loop, … Read more