• Resolved megseoh

    (@megseoh)


    NLP is currently pulling in the full-size image & I’d instead like it to display a specific size of thumbnail. In order to do so I’ve modified the default values array:

    $defaults = array(
        'title'            => NULL,          // Widget title
        'number_posts'     => 10,            // Number of posts to be displayed
        'time_frame'       => 0,             // Time frame to look for posts in days
        'title_only'       => TRUE,          // Display the post title only
        'display_type'     => 'ulist',       // Display content as a: olist (ordered), ulist (unordered), block
        'blog_id'          => NULL,          // ID(s) of the blog(s) you want to display the latest posts
        'ignore_blog'      => NULL,          // ID(s) of the blog(s) you want to ignore
        'thumbnail'        => TRUE,         // Display the thumbnail
        'thumbnail_wh'     => '325x220',       // Thumbnail Width & Height in pixels
        'thumbnail_class'  => NULL,          // Thumbnail CSS class
        'thumbnail_filler' => 'placeholder', // Replacement image for posts without thumbnail (placeholder, kittens, puppies)
        'thumbnail_custom' => FALSE,         // Pull thumbnails from custom fields
        'thumbnail_field'  => NULL,          // Custom field containing image url
        'thumbnail_url'    => NULL,          // Custom thumbnail URL
        'custom_post_type' => 'post',        // Type of posts to display
        'category'         => NULL,          // Category(ies) to display
        ...
    );

    I’ve also used the regenerate thumbnails plugin & have ensured that my custom 325px x 220px thumbnails exist.

    Is there somewhere else I need to modify the code? I’m not using the widget & am modifying network-latest-posts.php.

    Many thanks,

    https://ww.wp.xz.cn/plugins/network-latest-posts/

Viewing 1 replies (of 1 total)
  • Thread Starter megseoh

    (@megseoh)

    I figured it out. I had to edit my code in page-home.php where I was pulling in the posts:

    <div class="row" style="margin-top:20px;">
        <div class="col-md-12">
            <div id="news-carousel" class="carousel slide">
                <?php echo do_shortcode('[nlposts blog_id="17,18" number_posts="9" display_type="block" sort_by_date=true thumbnail=true thumbnail_wh="325x220" use_pub_date=true full_meta=true]'); ?>
            </div>
        </div>
    </div>
Viewing 1 replies (of 1 total)

The topic ‘Network Latest Posts Displaying Incorrect Image Size’ is closed to new replies.