Adding custom column in User List with custom action

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, …

Read more

Uncode theme, create author page and author link under the blog

before making edits, please consider to create a child theme for your customization; to show a link to the author’s page (, 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 …

Read more

Show the most recent post for an author on the author page

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’ );

Exclude Author by ID

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);

Author Link in Recent Posts Widget

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; …

Read more

finding out the top 5 source ( source is a custom taxonomy ), in a given category

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, 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 …

Read more