WordPress.org

Ready to get started?Download WordPress

Forums

Adding Metadata to RSS Feeds (3 posts)

  1. fncll
    Member
    Posted 6 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. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    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 6 years ago #

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

    http://wordpress.org/support/topic/63420#post-356315

Topic Closed

This topic has been closed to new replies.

About this Topic