Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I want to have a check like this one:
- <a href="<?php if ( function_exists('get_custom_field_value') ){
- get_custom_field_value('todays_mix_URL', true);
- } ?>">Download Now</a>
- In this function:
- <?php
- include_once(ABSPATH . WPINC . '/feed.php');
- $rss = fetch_feed(get_post_meta(get_the_ID(), "Blog RSS Feed", true));
- $rss_items = $rss->get_items( 0, $rss->get_item_quantity(5) );
- if ( !$rss_items ) {
- echo 'no items';
- } else {
- foreach ( $rss_items as $item ) {
- echo '<p><a href="' . $item->get_permalink() . '">' . $item->get_title() . '</a></p>';
- }
- }
- ?>
Add Comment
Please, Sign In to add comment