Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #2777738
Featured Image Adjustments
Closed

Comments

  • countfilms started the conversation

    Is there a way to adjust the size/responsive settings of the featured image on pages and posts? ive been having a hard time trying to find where the layout settings in general are for the whole site, like pages and posts. I want them all uniform but the settings seem to be acting up.

  •  2,580
    PenciDesign replied

    Hi,

    By default, PenNews using image dimension with 960px and auto height for feature image on the top of the post, please follow this step to change the featured image size:

    1. Go to Appearance > Customize > General Options, scroll to Manage Image Size, check on Disable Image Size - 960 x auto,

    2. Install plugin Code Snippets: https://wordpress.org/plugins/code-snippets/, then create a new Code Snippets with the following content:

    function penci_user_custom_featured_images_size() {
        add_image_size( 'penci-thumb-960-auto', 960, 550, true );
    }
    add_action('init','penci_user_custom_featured_images_size');

    Change 550 to the height you want. Read this document for how the add_image_size work: https://developer.wordpress.org/reference/functions/add_image_size/

    3. Install the plugin: https://wordpress.org/plugins/regenerate-thumbnails/, then go to Tools > Regenerate thumbnails. Click on Regenerate Thumbnails for all attachments.

    Best Regards,
    PenciDesign.

  • countfilms replied

    Thank you very much for your response. The "Manage Image Size" settings are very helpful!!

    A further question, is there a way to choose the thumbnail/preview image for each page/page separately from the featured image. Im running into a problem where my featured image is large with text in it, so the preview thumbnail cuts off or crops the image in an undesired way.

  •  2,580
    PenciDesign replied

    Hi,

    Please follow this guide to add an extra image field to your site and display it as a featured image on the top of the post:

    1. Install the plugin: https://wordpress.org/plugins/advanced-custom-fields/, then go to Custom Fields > Tools, import JSON file attachment.

    2. Go to Appearance > Theme Editor and move to the path: inc/post-format/post-format.php

    Find:

    $thumb = get_the_post_thumbnail( $post_id, $size );
    

    Add immediately below this line:

    if ( is_singular() && function_exists('get_field') && !empty(get_field('_custom_user_featured_image')) ) {
        $thumb = wp_get_attachment_image(get_field('_custom_user_featured_image'),$size);
    }

    Save Changes this file.

    The post now has the option name "Single Post Featured Image" on the Right side.

    Best Regards,
    PenciDesign.