Skip to content

Commit

Permalink
Adding custom metafield to RSS feed
Browse files Browse the repository at this point in the history
Adding custom metafield to the RSS feed for support more complete output.
  • Loading branch information
LeoOosterloo authored Apr 7, 2017
1 parent 0a52dd7 commit 07e7f1a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions wp-custom-rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ function pronamic_rss_text_limit( $string, $length, $replacer = '...' ) {
<title><?php echo get_the_title( $post->ID ); ?></title>
<link><?php echo get_permalink( $post->ID ); ?></link>
<enclosure url="<?php echo wp_get_thumbnail_url(get_the_ID()); ?>" type="image/jpeg" />
<description><?php echo '<![CDATA[' . pronamic_rss_text_limit( $post->post_content, 500 ) . ']]>'; ?></description>
<description><?php echo get_post_meta( $post->ID, 'name-of-meta-veld', true ); ?></description>
<description><?php echo '<![CDATA[' . pronamic_rss_text_limit( $post->post_content, 500 ), ' ', get_post_meta( $post->ID, 'name-of-meta-veld', true ) . ']]>'; ?></description>
<pubDate><?php pronamic_rss_date( strtotime( $post->post_date_gmt ) ); ?></pubDate>
<guid><?php echo get_permalink( $post->ID ); ?></guid>
</item>
Expand Down

0 comments on commit 07e7f1a

Please sign in to comment.