• I need to add some custom fields to my RSS feed and have no idea how to do this. I am using the Advanced Custom Fields plugin to create the fields and am including them in my loop. The loop contains an if/then statement that shows a different style depending on the category the post is in. The same thing I am doing for the loop I need it to look similar in my rss feeds. The content I have has some field that describe the entry and a link to an mp3 file. Each post will be a podcast episode and I will be using the RSS feed to submit the episodes to iTunes, Zune etc.

    Problem is I have no idea the best way to go about this. Any ideas?

    If it helps, below is what part of my loop looks like:

    <?php /* Display Sermon Posts */ if ( in_category(5)) { ?>
    
    	<div <?php post_class(); ?>>
    		<h2 class="bc-post-h2"><a href="<?php the_permalink(); ?>" title="Sermon &raquo; <?php printf( esc_attr__( '%s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark" class="bc-podcast-title bc-posts-title"><i>Sermon</i> &raquo; <?php the_title(); ?></a></h2>
    
    		<?php if (get_field('speakers_photo') !="") { ?><div class="speakers_photo"><img src="<?php the_field('speakers_photo'); ?>" width="100" height="100" /></div><? } else { echo ''; } ?>
    
    		<div class="bc-podcast-content bc-posts-content">
    			<?php if (get_field('recording') !="") { ?><div class="bc-podcast-field bc-podcast-recording"><?php $sermonRecording_temp = get_field('recording'); $sermonRecording = '[audio: '.$sermonRecording_temp.' | width=100%]'; insert_audio_player($sermonRecording); ?></div>
    			<? } else { echo ''; } ?>
    			<?php if (get_field('date') !="") { ?><div class="bc-podcast-field bc-podcast-date"><strong>Date:</strong> <?php the_field('date'); ?></div><? } else { echo ''; } ?>
    			<?php if (get_field('speaker') !="") { ?><div class="bc-podcast-field bc-podcast-speaker"><strong>Speaker:</strong> <?php the_field('speaker'); ?></div><? } else { echo ''; } ?>
    			<?php if (get_field('service') !="") { ?><div class="bc-podcast-field bc-podcast-service"><strong>Service:</strong> <?php the_field('service'); ?></div><? } else { echo ''; } ?>
    			<?php if (get_field('scripture_reference') !="") { ?><div class="bc-podcast-field bc-podcast-scripture"><strong>Scripture Reading:</strong> <?php the_field('scripture_reference '); ?></div><? } else { echo ''; } ?>
    		</div>
    		<div style="clear:both;"></div>
    	</div>
    
    <?php /* Display Bulletin Posts */ } elseif ( in_category(8)) { ?>

    Thank you!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Add custom fields to RSS feed’ is closed to new replies.