Filter Reference / iworks upprev get the post thumbnail

Description

iworks_upprev_get_the_post_thumbnail is a filter applied to a value thumbnail src.

Usage

function change_image($value) {
    # ...
    return $image_src;
}
add_filter('iworks_upprev_check', 'change_umage', 10, 1);

Return a image src value.

Parameters

$value
(boolean) (required) The value of image src, to display some image.

Default: None

Examples

Replace entry thumbnail if post belongs to category “News”:

add_filter('iworks_upprev_check', 'change_image_to_news');
function change_image_to_news($value) {
    if( is_post() && in_category('News') ) {
        return 'http:/example.com/images/news.png';
    }
    return $value;
}

Change Log

One thought on “Filter Reference / iworks upprev get the post thumbnail”

  1. Hi, two questions

    1. How can I modify the thumbnail so that it’s a rectangle instead of a square? All of my post default images are 16:9 images, so it should be easy to crop down to this size.

    2. How can I display the post headline below the thumbnail instead of next to it?

    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *