Put featured image under post title in admin area

Question

Instead of inserting a new column with a featured image on it, I would like to put the featured image under the post’s already existing title. I can’t seem to figure out how you insert things on the title property however. Achieving this:

enter image description here

I’ve found this post: How can i place Feature Image under title field in wp-admin?

With a snippet that I can’t get to work.
Otherwise there are lots of solutions for adding new columns with featured images in them.

I’ve arrived at something like this:

add_action('admin_head-edit.php', function(){
    add_filter('the_title', function( $title, $id ) {
        return $title . get_the_post_thumbnail_url();
    }, 100, 2);
});

But if I use get_the_post_thumbnail_url the url is embedded as part of the title, and if I use the_post_thumbnail( 'thumbnail' ) it renders the image twice.

0
Fluxian 1 month 2021-10-22T23:26:03-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse