How to add avatar to authors list?
How to add avatar to authors list?
How to add avatar to authors list?
A join to get the user role? I don’t think so. Since you’re into doing your own PHP (from the examples you’ve provided) do more research on the built in functions for what you’re looking to do in the WordPress Codex. As far as creating new roles the code below copies the Administrator role, removes …
Start up a new custom plugin for something like this, and add the first code below to add a custom “Actions” column, and the second function will add some link to the column for each row. add_filter( ‘manage_users_columns’, ‘new_column_user_table’ ); function new_column_user_table( $column ) { $column[‘actions’] = ‘Actions’; return $column; } add_filter( ‘manage_users_custom_column’, ‘new_column_user_table_row’, 10, …
before making edits, please consider to create a child theme for your customization; https://developer.wordpress.org/themes/advanced-topics/child-themes/ to show a link to the author’s page (https://developer.wordpress.org/reference/functions/get_author_posts_url/), put this code into the loop of the blog or post template file below the blog post code (please contact the theme’s developer for help with where in what file of your …
Basic debugging… $current_author = get_query_var(‘author’); var_dump($current_author); … would reveal that $current_author is a string, not an object. The problem is that you are trying to use the string as an object in the query. get_posts( ‘author=”.$current_author->id.”&posts_per_page=1&order=DESC&orderby=post_date’ ); Change $current_author->id to $current_author and the query works. $author_posts = get_posts( ‘author=”.$current_author.”&posts_per_page=1&order=DESC&orderby=post_date’ );
Where $that_user_your_filtering_out is the user/author ID you wan’t to filter out, make this modification to your loop foreach ($blogusers as $bloguser) { // modification starts here if($bloguser->user_id == $that_user_your_filtering_out){ continue; } // modification ends here echo ‘<div class=”content-slider-body”>’; $user = get_userdata($bloguser->user_id);
I think the rather simplistic approach would be: copy the whole WP_Widget_Categories from wp-includes/default-widgets.php, and paste it to your functions.php. In there, you could modify the output by customizing this part of the class: class WP_Widget_Recent_Posts extends WP_Widget { … <?php echo $before_widget; ?> <?php if ( $title ) echo $before_title . $title . $after_title; …
So far as I know there is no ‘last posted on’ value saved for a user. You can find that information by referencing the post_date in the *_posts table against the author data in *_users and *_usermeta. With that in mind I can think of several solutions. First Solution: Pull your authors. You need this …
I assume that you would be providing the author IDs in the widget options. And that the authors would be displayed in the order they were listed. Assuming the input would be -> 3,10,12 You can have the following code to display the authors with that user ID in that order: $user_ids = “3,10,12”; //this …
Thanks to some leads from the wp-hackers list on this very question and some googling around, here is the answer to my problem $sql = “SELECT count(*) as count,terms2.name as tag FROM wp_posts as p1 LEFT JOIN wp_term_relationships as r1 ON p1.ID = r1.object_ID LEFT JOIN wp_term_taxonomy as t1 ON r1.term_taxonomy_id = t1.term_taxonomy_id LEFT JOIN …