Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9083661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:49:36+00:00 2026-06-16T20:49:36+00:00

Hello stackoverflow friends! Hopefully somebody here can help me with this! I’ve looked all

  • 0

Hello stackoverflow friends!

Hopefully somebody here can help me with this! I’ve looked all over the internet with no luck 🙁

What I want to do is somehow show the images attached to a post inside the WP admin. For example, the same way the post Featured Image shows. The only thing I found was how to display the number of attachments of a post in the admin columns but what I would like to see is thumbnails of all attached images inside each post in the post admin page. I think this will be very helpful since right now I cannot even tell which post has attachements.

I will like to accomplish this without using a plugin.

I have looked for days online with no luck. Any help will be greatly appreciated.

Thank you very much in advanced!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:49:37+00:00Added an answer on June 16, 2026 at 8:49 pm

    try this :

       /* === Add Thumbnails to Posts/Pages List === */
    if ( !function_exists('o99_add_thumbs_column_2_list') && function_exists('add_theme_support') ) {
    
        //  // set your post types , here it is post and page...
        add_theme_support('post-thumbnails', array( 'post', 'page' ) );
    
        function o99_add_thumbs_column_2_list($cols) {
    
            $cols['thumbnail'] = __('Thumbnail');
    
            return $cols;
        }
    
        function o99_add_thumbs_2_column($column_name, $post_id) {
    
                $w = (int) 60;
                $h = (int) 60;
    
                if ( 'thumbnail' == $column_name ) {
                    // back comp x WP 2.9
                    $thumbnail_id = get_post_meta( $post_id, '_thumbnail_id', true );
                    // from gal
                    $attachments = get_children( array('post_parent' => $post_id, 'post_type' => 'attachment', 'post_mime_type' => 'image') );
                    if ($thumbnail_id)
                        $thumb = wp_get_attachment_image( $thumbnail_id, array($w, $h), true );
                    elseif ($attachments) {
                        foreach ( $attachments as $attachment_id => $attachment ) {
                            $thumb = wp_get_attachment_image( $attachment_id, array($w, $h), true );
                        }
                    }
                        if ( isset($thumb) && $thumb ) {
                            echo $thumb;
                        } else {
                            echo __('None');
                        }
                }
        }
    
        // for posts
        add_filter( 'manage_posts_columns', 'o99_add_thumbs_column_2_list' );
        add_action( 'manage_posts_custom_column', 'o99_add_thumbs_2_column', 10, 2 );
    
        // for pages
        add_filter( 'manage_pages_columns', 'o99_add_thumbs_column_2_list' );
        add_action( 'manage_pages_custom_column', 'o99_add_thumbs_2_column', 10, 2 );
    }
    

    it will show you the featured image as preview in the manage post /page list ,
    If you want to show it inside the post itself – use @Calle suggestion:
    (modified here to work)

    add_action( 'add_meta_boxes', 'o99_add_attach_thumbs_meta_b' );
    
    function o99_add_attach_thumbs_meta_b (){
    
    add_meta_box ('att_thumb_display', 'Attached images','o99_render_attach_meta_b','post');
    
    }
    
    function o99_render_attach_meta_b( $post ) {
    $output = '';
    $args = array(
            'post_type' => 'attachment',
            'post_mime_type' => 'image',
            'post_parent' => $post->ID
        );
        //
        // uncomment if you want ordered list
        //
        // $output .= '<ul>';
         $images = get_posts( $args );
        foreach(  $images as $image) {
        //$output .= '<li>';
            $output .= '<img src="' . wp_get_attachment_thumb_url( $image->ID ) . '" />';
            //$output .= '</li>';
        }
       // $output .= '</ul>';
      echo $output;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello StackOverflow Community, I hope you guys can help me with this here: On
Hello StackOverflow community, The air.swf file referenced here: http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_apps_3.html used to launch AIR applications
Hello All at StackOverflow, over the last few days I have had some problems
Hello all at StackOverflow.. Reasonably new to this site, but I have had nothing
Hello StackOverflow gurus. This is my first question on here so I am excited
Hello stackoverflow users hope you can help me. I have populated a treeview control
Hello stackoverflow's world, this is my first post here. I'm a newer in Android
Suppose I have this code: String encoding = UTF-16; String text = [Hello StackOverflow];
Hello good people of stackoverflow, this is a conceptual question and could possibly belong
Hello stackoverflow guru's! This is my first post after having used the site for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.