More posts from the current author

This will retrieve the posts of current author when used in the loop. Put the following in your theme functions.php: function my_get_display_author_posts() { global $authordata, $post; $authors_posts = get_posts( array( ‘author’ => $authordata->ID, ‘post__not_in’ => array( $post->ID ) ) ); $output=”<ul>”; foreach ( $authors_posts as $authors_post ) { $output .= ‘<li><a href=”‘ . get_permalink( $authors_post->ID … Read more

No authors in change author dropdown

The role “Reviewer” only has special capabilities, no other capabilities. To get into the author list you have to be at least a contributor or author. function rb_addroles() { $role = get_role(‘contributor’); remove_role( ‘reviewer’ ); add_role( ‘reviewer’, ‘Reviewer’, $role->capabilities ); $reviewer = get_role(‘reviewer’); $reviewer->add_cap( ‘edit_review’ ); $reviewer->add_cap( ‘read_review’ ); $reviewer->add_cap( ‘delete_review’ ); } add_action( ‘admin_init’, … Read more

Show Author in custom rss feed

Try it: <?php echo get_the_author_meta( ‘display_name’, $post->post_author ); ?> You can use the_author function in wordpress standard loop, Not foreach. to set global author information you should use the_post function. but in foreach, you can use get_the_author_meta instead of the_author to pass author id $post->post_author.

What’s a good way to put authors into groups

To do this literally (put authors into groups) best way would probably be to create custom taxonomy for users. See custom user taxonomies in WordPress for reference. However the end result you are looking for does not really deal with grouping users – it deals with grouping posts. Registering custom taxonomy (“company”) for posts would … Read more

Order the users by the date of their latest post

Put this in your functions.php: function get_users_ordered_by_post_date($args=””) { // Prepare arguments if (is_string($args) && ” !== $args) parse_str($args, $args); $asc = (isset($args[‘order’]) && ‘ASC’ === strtoupper($args[‘order’])); unset($args[‘orderby’]); unset($args[‘order’]); // Get ALL users $users = get_users($args); $post_dates = array(); if ($users) { // For EACH user … foreach ($users as $user) { $ID = $user->ID; // … Read more

Add rewrite endpoint to author page + pagination

Your code should works. The line: include (get_template_directory_uri() . ‘/articles.php’); Needs to have allow_url_include=1 in the server configration because you are trying to include a file via http. Can you check this? You must know also that template_redirect should be use for a real redirect, a include() may have undesired effects here. I think what … Read more