Showing an ACF field in admin posts dashboard

 function custom_columns( $columns ) {
        $columns = array(
            'cb' => '<input type="checkbox" />',
            'title' => 'Title',
            'featured_image' => 'Image',
            'categories' => 'Categories',
            'amazon_url' => 'Amazon Link',
            'comments' => '<span class="vers"><div title="Comments" class="comment-grey-bubble"></div></span>',
            'date' => 'Date'
         );
        return $columns;
    }

    add_filter('manage_posts_columns' , 'custom_columns');

    function custom_columns_data( $column, $post_id ) {
        switch ( $column ) {
        case 'featured_image':
            the_post_thumbnail( 'thumbnail' );
            break;
        case 'amazon_url' :
             echo get_field( 'product_url', $post_id );
             break;
        }
    }

    add_action( 'manage_posts_custom_column' , 'custom_columns_data', 10, 2 ); 
https://wordpress.stackexchange.com/questions/313315/showing-an-acf-field-in-admin-posts-dashboard
«
»
ACF (3)
Admin Column (4)
Breadcrumbs (2)
CSS (6)
Custom post types (4)
Custom Taxonomies (3)
Customizer (4)
Hooks & Filters (3)
Jquery (9)
LAMP (10)
Login (5)
Meta boxes (6)
Multisite (2)
My Code (1)
Open Graph Meta Tags (1)
Redirects (2)
SEO (4)
Theme Building (5)
Title Tags (2)
Typography (3)
Uncategorised (54)
User Roles & Capabilities (2)
White labeling (9)
Working with Images (11)
Working with videos (2)
WP Database (1)