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
  • #117343

    Post count: 64


    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 ) {

    this is the error: Cannot break/continue 1 level

    any other way to do this?

    thank you


    Lauren @ OnceCoupled
    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?


    I do custom WordPress work!
    Contact me directly:

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

You must be logged in to reply to this topic.