Featured Image with Particular Dimensions ?

This topic contains 4 replies, has 3 voices, and was last updated by  satadru 8 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #53254

    satadru
    Expired Member
    Post count: 21

    Hi,

    I am using the

    geodir_get_featured_image($post['ID'], 'thumbnail', get_option('geodir_listing_no_img'))

    to return the Featured Image, but it always return the default size Image & neglecting the thumbnail attribute.
    How to get Featured Image with Particular Dimensions ?

    #53285

    Paolo
    Site Admin
    Post count: 31206

    You can use the regular wordpress API call for that:

    <?php the_post_thumbnail( $size, $attr ); ?>

    Please see: https://codex.wordpress.org/Function_Reference/the_post_thumbnail

    Thanks

    #53406

    satadru
    Expired Member
    Post count: 21

    Thanks @paolo,

    I am not using the post loop, I am using the

    geodir_get_featured_image()

    in a REST API to get the Image.

    I must say the Geodirectory Functions are kick-ass & able to create the REST APIs by utilizing them. Just got stuck here about retrieving POST featured Image with specific dimension.

    Regards,
    Sat

    #53445

    Stiofan O’Connor
    Site Admin
    Post count: 22956
    This reply has been marked as private.
    #53849

    satadru
    Expired Member
    Post count: 21
    This reply has been marked as private.
Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket