Is there a author_update action?

There’s the edit_user_profile_update and personal_options_update actions that runs after a user is updated, with access to the user object. There’s also a variable update_{$meta_type}_meta action that runs when meta of type user is updated.

Author Avatar as default first image

There was a lotta junk in that function, here’s all you need: function get_post_image() { global $post; if ( preg_match( ‘/<img.+?src=[\'”]([^\'”]+)[\'”].*>/i’, $post->post_content, $matches ) ) $image = $matches[1]; else $image = get_avatar( $post->post_author ); return $image; }

Simple Local Avatar Plugin

The get_avatar function is pluggable, meaning that you can define a function of your own having that name and completely overwrite the default function. If you look at the source for the “Simple Local Avatars” plugin, that is exactly what it has done. get_avatar in your code should be using the function defined by “Simple … Read more

How to add a byline to all the pages?

You will do this in your theme and HOW you do it will depend on how your theme is set up. But to give a quick example, I’ll show you how to do it with any template with a loop. <?php if ( have_posts() ) { while ( have_posts() ) { the_post(); echo (‘<p>This post … Read more

Variable Not Working Inside is_author() Array

You’ve converted $taxonomy_id_list to a comma separated string then shoved that string into an array. Your array now looks like array( “1,2,3,4” ); That is not going to match any author ID. You are misunderstanding what implode does. This–1,2,3,4,5,6,7— is a set of integers. If place in the array like this– array(1,2,3,4,5,6,7)— you get an … Read more

Comment_author_url doing nothing

Change your query from: SELECT COUNT(comment_author_email) AS comments_count, comment_author_email, comment_author, comment_author_url FROM ‘.$wpdb->comments.’ WHERE comment_author_email != “” AND comment_type = “” AND comment_approved = 1 GROUP BY comment_author_email ORDER BY comments_count DESC, comment_author ASC LIMIT ‘.$amount To: SELECT *, COUNT(comment_author_email) AS comments_count, comment_author_email, comment_author, comment_author_url FROM ‘.$wpdb->comments.’ WHERE comment_author_email != “” AND comment_type = “” … Read more

get_comment_author_link not working properly

Simple solution drop this in your functions.php function your_get_comment_author_link () { global $comment; if ($comment->user_id == ‘0’) { if (!empty ($comment->comment_author_url)) { $url = $comment->comment_author_url; } else { $url=”#”; } } else { $url = get_author_posts_url($comment->user_id); } echo “<a href=\”” . $url . “\”>” .get_comment_author () . “</a>”; } If the user is registered this … Read more

If no author posts, echo out some text

Maybe this do the trick, put your if statement inside the function to check if the number of posts retrieved is >= 1, if so begin the foreach else print a message function get_related_author_posts() { global $authordata, $post; $authors_posts = get_posts( array( ‘author’ => $authordata->ID, ‘post_type’ => ‘kenniscentrum’, ‘post__not_in’ => array( $post->ID ), ‘posts_per_page’ => … Read more

How to show author page link

Have you tried something like: /*Get number of entries*/ function get_entries_num( $id ) { $count= count_user_posts( $id ); if ($count == 1) { return ‘<a href=”‘.get_author_posts_url($id).'”>’.sprintf(__(‘%s total post’,’upme’), $count).'</a>’; } else { return ‘<a href=”‘.get_author_posts_url($id).'”>’.sprintf(__(‘%s total posts’,’upme’), $count).'</a>’; } }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)