Get author image from corresponding article in thumbnail

<?php echo get_avatar( get_the_author_meta( ‘ID’) , 150); ?> Is exactly what I use. I think the issue is with “foreach( $recent_posts as $recent )”, I recommend using if ( $wp_query->have_posts() ) : I recommend checking out https://developer.wordpress.org/reference/classes/wp_query/ and remember to reset the loop with after your done wp_reset_postdata();

featured image metabox not moving custom post type

Hope this code may be help you. You can read the full parameters for add_meta_box in the codex. I also listed them here: add_meta_box( $id, $title, $callback, $page, $context, $priority, $callback_args ); function wpt_add_event_metaboxes() { add_meta_box( ‘wpt_events_location’, // $id ‘Event Location’, // $title ‘wpt_events_location’, // $callback ‘events’, // $page (Post Type) ‘side’, // $context ‘default’ … Read more

Change wording of default thumbnail metabox

This is usually what I go with: /** Use “Featured Image” Box As A Custom Box **/ function customposttype_image_box() { remove_meta_box(‘postimagediv’, ‘page’, ‘side’); add_meta_box(‘postimagediv’, __(‘Set Dat Image’), ‘post_thumbnail_meta_box’, ‘page’, ‘side’); } add_action(‘do_meta_boxes’, ‘customposttype_image_box’); /** Change “Featured Image” box Link Text **/ function custom_admin_post_thumbnail_html( $content ) { global $post; if($post->post_type == ‘page’) { $content = str_replace( … Read more

Issue with wordpress thumnails – same thumnail displayed everywhere

I’m guessing the problem is this: $recent_posts[0][‘ID’]; and I don’t see $recent_posts being defined in your code, so what exactly is that $recent_posts and where/how did you define it?: $image = wp_get_attachment_image_src( get_post_thumbnail_id($recent_posts[0][‘ID’]), ‘full’ ); And you’re inside The Loop, so you could just call get_post_thumbnail_id() without having to specify the post ID — or … Read more