whyisjake

Jake Spurlock

Feb 8th, 2010
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. I want to have a check like this one:
  2.  
  3. <a href="<?php if ( function_exists('get_custom_field_value') ){
  4.                             get_custom_field_value('todays_mix_URL', true);
  5.                         } ?>">Download Now</a>
  6.  
  7. In this function:
  8.  
  9. <?php
  10.                     include_once(ABSPATH . WPINC . '/feed.php');
  11.                     $rss = fetch_feed(get_post_meta(get_the_ID(), "Blog RSS Feed", true));
  12.                     $rss_items = $rss->get_items( 0, $rss->get_item_quantity(5) );
  13.                     if ( !$rss_items ) {
  14.                         echo 'no items';
  15.                     } else {
  16.                         foreach ( $rss_items as $item ) {
  17.                             echo '<p><a href="' . $item->get_permalink() . '">' . $item->get_title() . '</a></p>';
  18.                         }
  19.                     }
  20.                     ?>
Add Comment
Please, Sign In to add comment