duplicate featured image functionality in custom meta box

you can try this to add custom content in the metabox : add_action(“add_meta_boxes”, function (string $post_type, \WP_Post $post) { // the post type can be tested here $GLOBALS[“wp_meta_boxes”][“page”][“side”][“low”][“postimagediv”][“callback”] = function ($post) { // the original content to select the featured image post_thumbnail_meta_box($post); ?> <p> custom content </p> <?php }; }, 10, 2);

the_post_thumbnail() for displaying page feautred image?

To display featured image of a specific page/post in anywhere: $the_id = 4; // The Page or post ID echo wp_get_attachment_url( get_post_thumbnail_id($the_id, ‘thumbnail’) ); hope it will work, if not work try this: $args = array(‘page_id => 4’); $featured_image = get_posts($args); foreach($featured_image as $image) : setup_postdata($image); echo the_post_thumbnail(); endforeach; wp_reset_postdata();

Product thumbnail size in catalog

Set the product thumbnail size and enforce whichever form of cropping gives you the consistency you’re looking for. This will let you set whatever width you prefer: <?php function wpse_307110_override_thumbnail_sizes() { $theme_support = get_theme_support( ‘woocommerce’ ); $theme_support = is_array( $theme_support ) ? $theme_support[0] : array(); // change 150 to whatever width you need $theme_support[‘thumbnail_image_width’] = … Read more

How to add the option to choose between sizes for featured image within post editor?

<?php // First, enable thumbnails if they are not enabled yet add_theme_support( ‘post-thumbnails’ ); /* * Add image dimensions * * name * width * height * crop or resize (true or false) * * 99999 means very big number */ add_image_size( ‘featured-portrait’ , 200 , 99999, false ); add_image_size( ‘featured-landscape’ , 99999, 200 , … Read more