custom page with posts and galleries

Community Forums Forums General Discussion custom page with posts and galleries

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Lauren @ OnceCoupled 3 weeks, 5 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #117343

    mmjaeger
    Participant
    Post count: 64

    Hello

    I’d like to list only posts that have more than one image attached – I tried to put something like this using the before_entry_hook after the while statement in the loop but I’m getting an error:

    $media = get_attached_media( 'image', get_the_ID() ); // since WP 3.6
    	if ( count( $media ) === 1 ) {
    		continue;
    	}

    this is the error: Cannot break/continue 1 level

    any other way to do this?

    thank you

    #120567

    Lauren @ OnceCoupled
    Member
    Post count: 608

    Heyo! Did you figure out how to do this? I can at least think of a way to check if there is a featured image. If you still need help, can you provide any additional details?

    Best,
    Lauren


    I do custom WordPress work! http://oncecoupled.com
    Contact me directly: lauren@oncecoupled.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.