Just wanted to Pull Author’s Link

If the_author_meta is already working for you, you should be able to use get_the_author_meta(‘ID’) to pass with the get_author_posts_url(); So, like this: <a href=”https://wordpress.stackexchange.com/questions/269316/<?php echo get_author_posts_url( get_the_author_meta(“ID’) ); ?>”>Read More</a> Let me know if that works for you!

Allow Content Author to Publish, But Not Edit or Delete

I would create a new user role, and then assign that role to the user when you create their account. In your functions.php: add_role(‘content_writer’, ‘Content Writer’, array( ‘read’ => true, ‘publish_posts’ => true, ‘edit_posts’ => false, ‘delete_posts’ => false, )); You can see the codex for an additional listing of available roles and capabilities.

How to get posts without author?

That won’t be as easy as you’d like to… get_posts uses WP_Query to get posts and if you take a look at WP_Query code, ten you’ll see, that 0 is used as empty in there (https://core.trac.wordpress.org/browser/tags/5.0.3/src/wp-includes/class-wp-query.php#L2052): if ( ! empty( $q[‘author’] ) && $q[‘author’] != ‘0’ ) { It means, that you can’t pass ‘author’ … Read more

User Published Post Count

Here are some different approaches: Fetch users with get_users() and paginate them with e.g. 10 per page. For each user, call WP_Query with date_query for the last 24 hours, else last week. Use author input argument and posts_per_page as 1 (we don’t need more) and get the total posts from WP_Query::found_posts. pros: Uses only WordPress … Read more

How to hide posts count and posts of other users from edit.php for contributors and authors

In order to remove a specific All() and Pubished() post counts from Posts-editor page you can: // Create a specific hook add_filter(“views_edit-post”, ‘custom_editor_counts’, 10, 1); function custom_editor_counts($views) { // var_dump($views) to check other array elements that you can hide. unset($views[‘all’]); unset($views[‘publish’]); return $views; } Lets go more advanced and remove All() from Posts-editor admin table … Read more

How we can get the author ID by its Name

get_user_by will get you the user data by ‘id’, ‘slug’, ’email’, or ‘login’. ‘slug’ is the user_nicename. $user = get_user_by(‘slug’,’nicename’); However, I am not sure what you mean by ‘name’. There are other plausible ‘name’ fields, not all of them required. There is the display_name for example. To search fields like user_nicename you will need … Read more

List authors of site with link and gravatar

To answer your problems: Sorting by post count You can collect all the information you need in to an array and sort that array by number of posts , like this: //function to sort array by filed function authors_orderBy($data, $field){ $code = “if (\$a[‘$field’] == \$b[‘$field’]) {return 0;} return (\$a[‘$field’] < \$b[‘$field’]) ? 1 : … Read more