Adding Metadata to RSS Feeds (3 posts)

  1. fncll
    Posted 7 years ago #

    I have a block of information that comes from custom fields. I display it with the following code on the pages themselves... how can I get this same information appended to the RSS feed (all feeds would be even better) for each item?

    Display Code

    if (get_post_meta($post->ID, author, True)) {
        if (get_post_meta($post->ID, authorlink, True)) {
        echo  '<p>';
         echo  '<a>ID, authorlink, True) . '">';
        echo  get_post_meta($post->ID, author, True);
        echo  echo '</a>';
    else {
        echo  get_post_meta($post->ID, author, True);
        echo  '';
  2. You can use the rss2_item action hook to insert code into the RSS2 feed (inside the item block).

    You can use the atom_entry action hook to do the same with the ATOM feed (inside the entry block).

  3. Kafkaesqui

    Posted 7 years ago #

    Along with Otto's suggestions, see my plugin here (which is a bit out of date, but the basics still apply):


Topic Closed

This topic has been closed to new replies.

About this Topic