Title: [Plugin: podPress] Customize feed fields
Last modified: August 19, 2016

---

# [Plugin: podPress] Customize feed fields

 *  [lolo92](https://wordpress.org/support/users/lolo92/)
 * (@lolo92)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-podpress-customize-feed-fields/)
 * Hi
 * I’d like to send the feed with custom content : for example I don’t want the 
   full article to be inserted in the idem <description> but something else like
   a custom field.
 * Could I have a clue on that, where shall I should start ?
 * Thanks a lot !

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [ntm](https://wordpress.org/support/users/ntm/)
 * (@ntm)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-podpress-customize-feed-fields/#post-1754444)
 * podPress does not modify the <description>-element of <item>-elements of RSS 
   feeds. It is only possible to modify the <description>-element of the channel(
   RSS) or subtitle (ATOM) with podPress.
 * But WP includes two ways to modify these <description> elements:
    – You can choose
   in the Reading Settings section of your blog whether it should contain the Full
   Text of the post or a summary. – You could use the excerpt box below the post
   editor. If you write something into this box it will be automatically the content
   of the <decription> element of the Feed <item>s.
 * If you want to modify or filter the content of <description>-elements of the 
   <item>s in combination with a custom field then you may use a filter plugin which
   uses the [WP Filter Hook](http://codex.wordpress.org/Plugin_API/Filter_Reference)‘
   the_excerpt_rss’. (Although the name suggests it otherwise this hooks works for
   the equivalent of the <description> element of the ATOM Feeds, too.)
    Maybe there
   is already a plugin which makes what you want to achieve.
 * But if you are technical minded then you may write your own filter plugin. It
   is maybe not that difficult.
 * I would do it like this:
 *     ```
       <?php
       /*
       Plugin Name: my personal feed element filter
       Plugin URI:
       Description: filters the post content in the feeds
       Author: my name
       Version: 1.0
       Author URI:
       */
   
       add_filter('the_excerpt_rss', 'pff_modify_excerpt');
       function pff_modify_excerpt($description_content) {
       	// get the ID of the current post
       	$post_id = get_the_ID();
   
       	// get all values of the custom field(s) with this custom field name of a current post (see http://codex.wordpress.org/Function_Reference/get_post_custom_values for more info)
       	$customfieldvalues = get_post_custom_values('insert here the name of custom field', $post_id);
       	if ( TRUE == is_array($customfieldvalues) ) {
       		// if the current post has at least one custom field with this name then put the contents together as the new description content
       		foreach ( $customfieldvalues as $key => $value ) {
       			if ( FALSE == empty($value) ) {
       				$new_description_content .= $value;
       			}
       		}
       		// if the new description content is not empty then replace the current content with the new one
       		if ( FALSE == empty($new_description_content) ) {
       			$description_content = $new_description_content;
       		}
       	}
       	return $description_content;
       }
       ?>
       ```
   
 * Put this code into a file with file name extension .php and store this file in
   the plugins folder of your blog (e.g. /wp-content/plugins/). Replace `insert 
   here the name of custom field` with the custom field name you like to use.
 * This way you could write also filters for other sub elements of <item>s (or <
   entry>s).
    podPress (especially the upcoming version 8.8.8) has mainly possibilities
   to modify the channel elements and it adds of course the <enclosure> elements(
   and in RSS feeds the itunes elements) to the <item>s (and <entry>s).
 * Regards,
    Tim
 *  Thread Starter [lolo92](https://wordpress.org/support/users/lolo92/)
 * (@lolo92)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-podpress-customize-feed-fields/#post-1754449)
 * Thanks a lot, I didn’t remember about using resume in rss feeds…
 * And I’ll give a try at your script, I can type some PHP 😉
 * Thanks again !
 * Regards
    Laurent
 *  Plugin Author [ntm](https://wordpress.org/support/users/ntm/)
 * (@ntm)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-podpress-customize-feed-fields/#post-1754503)
 * Hi Laurent,
 * I have a further note on that topic:
    podPress adds of course the <itunes:summary
   > and <itunes:subtitle> elements to RSS <item> elements and these elements contains
   by default also the post content. But it is possible to edit the content of these
   elements for each post (see “Post specific settings for iTunes” below the post/
   page editor). But there is no filter hook for these elements.
 * Regards,
    Tim

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: podPress] Customize feed fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/podpress_f79938.svg)
 * [podPress](https://wordpress.org/plugins/podpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/podpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/podpress/)
 * [Active Topics](https://wordpress.org/support/plugin/podpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/podpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/podpress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [ntm](https://wordpress.org/support/users/ntm/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-podpress-customize-feed-fields/#post-1754503)
 * Status: not resolved