• Is there a way I can add a static item to the top of my RSS news feed?

    I.e. one that links to my forum or the homepage itself instead of just showing the latest article I have posted?

Viewing 5 replies - 1 through 5 (of 5 total)
  • not that i know of, but it’s a rather simple hack. just filter the_posts with your plugin and push your static page to the front of the list.

    You can edit the description in your feed file to include a link.

    Thread Starter speekgeek

    (@speekgeek)

    Excellent, I added the link in the file “wp-rss2.php”

    Tip – insert it before the line:-

    <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>

    or your link will repeat on every second entry.

    I don’t know if that was the directions I was given but it worked.

    Thanks

    Thread Starter speekgeek

    (@speekgeek)

    Thread Starter speekgeek

    (@speekgeek)

    I just discovered that you not only have to modify the wp-rss2.php file but if you want to be thorough, the following ones also :

    wp-rss.php
    wp-rdf.php
    wp-atom.php

    What I did was load the above files in my browser and then copy one of the xml entries. Then edit the same file on my hard disk by pasting that piece of code into the file, just above the line:-
    <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>

    Change the description and URL to reflect the static entry that you want displayed on top of your news feed. I dona€?t know what people used before Firefox live bookmarks but IMO the feature rocks. https://www.mozilla.org/products/firefox/live-bookmarks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Static Item on top of RSS feed’ is closed to new replies.