WordPress Custom Local Avatar not showing in comments

I found a solution and now my frontend avatar script is fully functioning. Happy days 🙂 I ended up scrapping the above code and using this. add_filter( ‘pre_get_avatar_data’, ‘wad_avatar_meta’, 10, 2 ); function wad_avatar_meta( $args, $id_or_email ){ $user_avatar_meta_key = ‘avatar’; if( is_object( $id_or_email ) && isset( $id_or_email->comment_ID ) ){ $id_or_email = get_comment( $id_or_email ); } … Read more

Parent comment’s author display_name

So to do the same thing but for the parent comment this should do it. This is untested but does the same thing as your first case, but with the parent comment object instead of the current comment. if( $comment->comment_parent ) { $parentComment = get_comment($comment->parent); $usermeta = get_userdata($parentComment->user_id); echo $usermeta->display_name ; } Does that do … Read more

Upload avatar for post comment

WordPress doesn’t have built-in profile pictures (Avatars) by default. See Settings > Discussion in the menu for available options. So you may have a few options: Use Gravatar, as this is bundled in WordPress by default and free but would not require a profile image upload button as its managed separately. Look for an Avatar … Read more

Same comment section on every page

With some testing this appears to be achievable with two filters. Firstly you want to set front end queries for comments to query for comments for all posts, instead of just the current post. That can be done like this: add_action( ‘pre_get_comments’, function( $comment_query ) { if ( ! is_admin() ) { $comment_query->query_vars[‘post_id’] = 0; … Read more

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