> ]+src=[\'"]([^\'"]+)[\'"][^>]*>/i', $post_content, $matches); // Check if a matching image URL is found if (!empty($matches[1])) { // Get the matched image URL $image_url = $matches[1]; // Output the custom HTML structure ?>
<?php echo esc_attr(get_the_title()); ?>
,
', '' ); else: the_title( sprintf( '
', esc_url( get_permalink() ) ), '
' ); endif; the_excerpt(); ?>