>
', '' ); } else { the_title( sprintf( '

', esc_url( get_permalink() ) ), '

' ); } if ( ! is_singular() && has_shortcode( $post->post_content, 'gallery' ) ) : $gallery = get_post_gallery( $post, false ); $ids = array(); $thumbs = array(); $attachments = array(); if ( isset( $gallery['ids'] ) ) { $ids = explode( ',', $gallery['ids'] ); } if ( empty( $ids ) ) { $attachments = get_children( array( 'post_parent' => get_the_id(), 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ); foreach ( $attachments as $attachment ) { array_push( $ids, $attachment->ID ); } } ?> ' . get_the_title() . '' ) ); ?> ', '' ); ?>