Skip to content

Instantly share code, notes, and snippets.

@rafaeluzzi
Created February 13, 2009 13:46
Show Gist options
  • Save rafaeluzzi/63901 to your computer and use it in GitHub Desktop.
Save rafaeluzzi/63901 to your computer and use it in GitHub Desktop.
<?php //begins feed type conditional ?>
<?php if ($item->get_feed_domain() == "tumblr.com"):?>
<?php //begins content type conditionals ?>
<?php if ($item->item_data['type'] == 'audio'):?>
<!--tumblr audio item-->
<h1><a href="<?php echo $item->get_permalink()?>"><?php echo $item->get_title()?></a></h1>
<?php echo $item->get_audio(); ?>
<?php elseif ($item->item_data['type'] == 'regular'):?>
<!--tumblr text item-->
<h1><a href="<?php echo $item->get_permalink()?>"><?php echo $item->get_title()?></a></h1>
<?php if ($item->has_content()): ?>
<?php echo $item->get_content()?>
<?php endif; ?>
<?php //and so on for styling the diferent content types from tumblr ?>
<?php endif;?>
<?php //ends content type conditionals ?>
<?php endif;?>
<?php //ends feed type conditional ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment