Support » Theme: Gridzone » How to display the external link image as a thumbnail on the homepage?

  • joe1803

    (@joe1803)


    Hello,
    I really like this theme of yours,
    because my pictures are placed in other spaces,
    I want to use the first external link image in a post as a thumbnail.
    How Can I achieve this?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter joe1803

    (@joe1803)

    I see the following code in functions.php,
    but I don’t know how to enable this function

    /* Theme setup
    /* ———————————— */
    if ( ! function_exists( ‘gridzone_setup’ ) ) {

    function gridzone_setup() {
    // Enable title tag
    add_theme_support( ‘title-tag’ );

    // Enable automatic feed links
    add_theme_support( ‘automatic-feed-links’ );

    // Enable featured image
    add_theme_support( ‘post-thumbnails’ );

    // Enable alignwide and alignfull images and galleries
    add_theme_support( ‘align-wide’ );

    // Enable post format support
    add_theme_support( ‘post-formats’, array( ‘image’, ‘gallery’, ‘video’, ‘audio’ ) );

    // Declare WooCommerce support
    add_theme_support( ‘woocommerce’ );

    // Enable Jetpack infinite scroll
    add_theme_support( ‘infinite-scroll’, array(
    ‘type’ => ‘click’,
    ‘container’ => ‘masonry’,
    ‘wrapper’ => true,
    ) );

    // Enable support for selective refresh of widgets in customizer
    add_theme_support( ‘customize-selective-refresh-widgets’ );

    // Thumbnail sizes
    add_image_size( ‘gridzone-small’, 200, 200, true );
    add_image_size( ‘gridzone-medium’, 520, 347, true );
    add_image_size( ‘gridzone-medium-h’, 520 );
    add_image_size( ‘gridzone-large-h’, 940 );

    // Thumbnail sizes custom widgets
    add_image_size( ‘alx-small’, 200, 200, true );
    add_image_size( ‘alx-medium’, 520, 347, true );

    // Custom menu areas
    register_nav_menus( array(
    ‘mobile’ => esc_html__( ‘Mobile’, ‘gridzone’ ),
    ‘header’ => esc_html__( ‘Header’, ‘gridzone’ ),
    ) );
    }

    }
    add_action( ‘after_setup_theme’, ‘gridzone_setup’ );

    Theme Author Alexander Agnarson

    (@alxmedia)

    Hi, glad to hear.

    Try using a plugin to auto-set featured images:

    https://wordpress.org/plugins/quick-featured-images/

    Thread Starter joe1803

    (@joe1803)

    Thank you for your reply
    But after I use this plug-in
    the remote picture still cannot be displayed as a thumbnail.
    The thumbnail I saw on the homepage Code is like this: https://www.xxxx.com/wp-content/themes/ gridzone/img/thumb-medium.png

    https://i.postimg.cc/zDypDhjH/2021-02-24-123313.png

    • This reply was modified 3 months, 3 weeks ago by joe1803.
    • This reply was modified 3 months, 3 weeks ago by joe1803.
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.