Skip to content

Instantly share code, notes, and snippets.

@dherbold
Created April 30, 2013 00:08
Show Gist options
  • Save dherbold/5485773 to your computer and use it in GitHub Desktop.
Save dherbold/5485773 to your computer and use it in GitHub Desktop.
why don't (doesn't) this work?
<div class="indent">
<?php include_once('homepage-gallery.php')
$id = '222';
$existing_attachments = attachments_get_attachments($id);
if( is_array($existing_attachments) && !empty($existing_attachments) ) {
$attachment_index = 0;
echo '<ul>';
foreach ($existing_attachments as $attachment) {
$attachment_index++;
?>
<li><?php echo wp_get_attachment_image( $attachment['id'], array(355, 160), 1 ); ?></li>
<?php }}?>
<?php echo '</ul>'; ?>
</div>
@dherbold
Copy link
Author

this is what's causing the infinite loop on the home page. WTF?

@dherbold
Copy link
Author

It's undefined. I'm vague on what needs to be written to make it defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment