• Here is the code I’m using to call the attached images of a post to show as an image slider:

    $attachments = get_posts(array(
    					'post_type' => 'attachment',
    					'numberposts' => -1,
    					'post_status' => null,
    					'post_parent' => get_the_ID(),
    					'order' => 'ASC',
    					'orderby' => 'rand',
    
    				));

    However, as you can see with the link below, I only want to show the larger images that I upload to be use as the slider images – not the smaller logo image and image used in the content section.
    https://www.stickerstork.com/portfolio/rook/

    How can I add an attribute that will only use attachment images with a width larger than 1000px?

    Thanks in advanced for your help!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘get_posts attachments exclude images under specific width’ is closed to new replies.