Click to go to USFreeAds' website
About
This website is all about strategies to help you grow your niche store empire. I have many Build A Niche Store sites and use the strategies that I share here.
Newsletter
Subscribe to my posts and get all of the latest tips and strategies sent directly to your email!
Delivered by FeedBurner
RSS Feed
Get the most recent posts and comments sent to you directly by subscribing to my RSS feeds!
Subscribe to RSS! Subscribe to RSS Comments!

Feb
14

How to Add Multiple RSS Content Pages to Your Site

RochelleHow To..., Strategies

You probably already know how important fresh content is to a web site. Sites that don’t have regularly updated content are seen by search engines as stagnant. This, in turn, will lower the site’s value to search engines and such sites will rank lower than comparable sites with new content.

Perhaps you have already added an RSS content page but now want to add one or more additional pages. Or, maybe you know you want to add multiple RSS content pages but haven’t done any yet. No problem, just follow along here.

This is another of Mark’s mods. I don’t have the original page where this mod came from or I would post it here. If I ever get it I will add it.

If you want to just one RSS content page then you can read my instructions on how to do this here.

 

My instructions to add multiple RSS content pages to your site:

Step One
  Find the URL for the RSS feed you want to use. If you don’t know how to find an RSS feed then type ‘RSS feed directory‘ into your favorite search engine and search through the directories for a feed.
   
 

NOTE: Make sure you click the RSS subscription button. This may be found after a URL or there may be a RSS link somewhere, such as at Google News:

Image of what an RSS button looks like

After you click the RSS button you should see a page that looks similar to the image below. There will be an option to subscribe to the feed (don’t do this) and results for the feed showing below. It is this URL that you will use for this mod:

Image of what an RSS subscription page looks like

Step Two
  If you haven’t already done so, download rss-files.zip files, save them to your computer, and unzip them.
   
  Every RSS feed that you create a content page for will need its own ex-rss.php file. So, make as many copies as you need of the original ex-rss.php file and rename the copies as such:
 
  • ex-rss.php (original file for first content)
  • ex2-rss.php (for second content page)
  • ex3-rss.php (for third content page)
  • and so on
Step Three
  Use an FTP to upload the unzipped files and all additional ex-rss.php files to your site’s root directory (where your site’s index.php is located). (Click here to read about my favorite FTP.)
   
  If you previously uploaded the unzipped files to your site then just upload the additional ex-rss.php files.
Step Four
  Edit each new ex-rss.php (click here if you don’t know how to do this) with the following changes for each RSS feed you will use:
 
  • Change $feedurlstart = ‘http://rss.nascar.com/rss/drivers_dearnhardtjr.rss‘; to one of the RSS feed URLs you are using (from step one).
  • Change $keyword= ‘earnhardt‘; to whatever keyword(s) are relevant to your results.
  • Change $searchresults = ‘20‘; to however many results you want to show. According to Mark it is best to have less than twenty results for best performance so you can either leave this as is or change it to a smaller number.
   
  Save changes to each additional ex-rss.php file.
Step Five
  Log in to your site’s Admin and click on the ‘Content Pages‘ tab and ‘Create New Page‘ link.
   
  Create a new content page for every new page you need. Name each page something like, “Niche Items in the News,” but change Niche Items to whatever your RSS feed results will be about. Save each page.
Step Six
  Note: Skip this step if you did the Permalink or Mark’s Sitemap mods. This is a duplication of code used in these mods and adding it again will cause a fatal error on your site.
   
  Click the ‘Template‘ tab and ‘header.php‘ link for the template you are using.
   
  Copy the contents of rss01.txt and paste it ABOVE the </head> tag. (If you already did this for a single RSS content page then you can skip this step.)
   
  Save changes and view site for errors.
Step Seven
  Decide if you want any text added to your RSS content pages (added via the Page Content section) to be displayed above the RSS feed results or below them.
 
  • For text ABOVE results add the code the following to footer.php from the template you are using
  • For text BELOW results add the code the following to header.php from the template you are using
Step Eight
  Copy the contents of rss02.txt and paste it to Notepad (or equivalent). Or, if you previously pasted this code into your footer.php or header.php then copy that code and paste it to Notepad and continue.
   
  You need to modify the code you just pasted into Notepad. Add some additional code for every additional RSS content page you created.
   
  First, add a new $newsfile = ‘ex-rss.php’; tag DIRECTLY UNDER the original $newsfile1 = ‘ex-rss.php’; tag.
   
 

Note: Each new tag will have a different number system than the original tag. For example, if you will have a total of three RSS content pages then your code will look like (notice how each line has a different number system):

$newsfile1 = ‘ex-rss.php’; $newsfile2 = ‘ex2-rss.php’; $newsfile3 = ‘ex3-rss.php’;

   
 

Second, add a new

if (curPageURL() == “http://www.MyNicheURL.com/MyNiche-News-Page”) If (file_exists($newsfile1)) { echo include(”ex-rss.php”); } else { echo “The file you requested does not exist”; } ?>

tag DIRECTLY UNDER the original

if (curPageURL() == “http://www.MyNicheURL.com/MyNiche-News-Page”) if (file_exists($newsfile1)) { echo include(”ex-rss.php”); } else { echo “The file you requested does not exist”; } ?>

tag.

   
 

Note: Each new tag will have a different number system than the original tag. For example, if you will have a total of three RSS content pages then your code will look like (the green code is the new code that you added to the original code:

if (curPageURL() == “http://www.MyNicheURL.com/MyNiche-News-Page”)

if (file_exists($newsfile1)) {


echo include(”ex-rss.php”);


} else {


echo “The file you requested does not exist”;


}


if (curPageURL() == “http://www.MyNicheURL.com/MyNiche-Other-News-Page“)


if (file_exists($newsfile2)) {


echo include(”ex2-rss.php”);


} else {


echo “The file you requested does not exist”;


}


if (curPageURL() == “http://www.MyNicheURL.com/MyNiche-Even-Another-News-Page“)


if (file_exists($newsfile3)) {


echo include(”ex3-rss.php”);


} else {


echo “The file you requested does not exist”;


}


?>

   
  The code you add to either your footer.php or header.php will look something like the code in rss03.txt.
  Change the following bits of code before you save your changes:
 
  • Change “http://www.MyNicheURL.com/MyNiche-News-Page” to each RSS feed URL for every additional content page you created in step five.
Step Nine
  Copy your modified code from Notepad and paste it to one of the following:
 
  • header.php (any text you add will be below the results) - paste contents BELOW all other code in header.php.
  • footer.php (any text you add will be above the results) - paste contents ABOVE all other code in footer.php
   
  Save changes and view site for errors.
done

This was easily the most challenging instruction I have written. I apologize if it seems confusing.

Rochelle

Related Posts:

  • How to Add a Single RSS Content Page to Your Site
  • How to Hide Pages and Add Them to Your Site’s Footer
  • How to Change the Font Color for Content Areas on Your Site
  • How to Add Permalinks (or Link-Backs or Trackbacks) to your Site
  • How to Add Mark’s Sitemap to Your Site
  • How to Redirect Deleted or Renamed URLs to New Pages with a 301 Redirect
  • How to add a ‘Safety on eBay’ page to Your Site
  • How to Add ‘Bookmark This Site’ Code to Your Site
  • How to Add a Dynamic Sitemap to Your Site
  • How to Move a Sidebar Menu From One Side of Your Site to the Other Side
  • RSS feed | Trackback URI

    7 Comments »

    Comment by Rochelle
    2008-02-15 14:01:43

    Step one says to click the RSS button on the URL of the feed you want but this may not always be correct. I followed these instructions and got my RSS feed from Google News. In this case clicking the RSS icon on the URL bar brought me to an atom feed, not an RSS feed. I should have scrolled down and clicked the ‘RSS’ link on the left sidebar.

    So, check the URL you are using to see if it says RSS or ATOM. If it is ATOM then you need to go back and get the RSS subscription link and verify that it says RSS at the end. (It may or may not be in capitals.)

    Some RSS URLs have the ‘RSS’ or ‘ATOM’ at the end of the URL but not all. Some have it mixed in the middle.

    Rochelle

     
    Comment by Webmogul
    2008-02-15 18:13:28

    You might want to include a disclaimer that technically this is scraping content and the originators of that content may not approve of such activities since it isn’t for personal use.

     
    Comment by Rochelle
    2008-02-15 20:50:32

    I’m afraid I’m going to show my ignorance but what is the definition of content scraping? I thought it was stealing someone else’s work and passing it off as your own. This mod is giving headlines, who wrote it (if available), a sentence or two of the story, and a link to the original story. Please help clarify.

     
    Comment by Dave
    2008-03-02 03:35:23

    There is no problem with using RSS and copyright infractions if you don’t pass the content of as your own, if that was the case a lot a people would get sued, and yes it also goes for if you use the feeds in some kind of commercial way.

    So no worries this is not scraping.

     
    Comment by Bill
    2008-05-21 23:36:16

    Ive been using this method since mark first made this mod. There were difficulties adding php feeds and Mark was nice enough to take the time to write it and give to the community,
    PHP is the only feed that the SEs can read as fresh content from what I understand. So this is a huge help.
    Thanks for writing another set of very clear instructions Rochell !!!
    Bill

     
    Comment by AlexM
    2008-08-13 18:37:21

    I found your site on technorati and read a few of your other posts. Keep up the good work. I just added your RSS feed to my Google News Reader. Looking forward to reading more from you down the road!

    AlexMs last blog post.."Inappropriate billionaire" made the "Google" office paradise

     
    Name (required)
    E-mail (required - never shown publicly)
    URI
    Subscribe to comments via email
    Your Comment (smaller size | larger size)
    You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

    Trackback responses to this post