A Simple Way to Add Free News Content to Your Website

A challenge that many website owners face is how to supply continuously fresh content for new and repeat visitors to peruse.

It can be a very time-consuming task to manually upload regular updates. Fortunately, there is an easy way to showcase free, readily available news content on a wide variety of topics.

We will examine a quick and effective method of incorporating RSS (Really Simple Syndication) coding in order to add news content to any site. First, let’s look at what RSS is, and how it works.

RSS is an online coding solution that delivers automatic updates for Web content. Say, for instance, you add an RSS code for international news to your website from a popular source, such as CNN, Reuters, or the BBC. Visitors would be able to access new content links as often as the source updated their news feed. In other words, you get the benefit of presenting the very latest desired information online, with no effort on your part.

Due perhaps to a misguided perception that it is difficult to add the necessary coding to make RSS work within a website’s framework, it remains an extremely underutilized resource.

A typical RSS newsfeed (this one from the BBC) looks like:

http://feeds.bbci.co.uk/news/world/rss.xml

When the XML document is updated by the BBC, the new information is automatically displayed on any website that has incorporated the above URL to obtain World News.

You can find RSS feeds all over the Web; just look for the small orange icon with a dot and two waves above it. The very latest data is available on diverse subjects ranging from international news, to financial updates, to reports on innovations in the food and drink industry, to the latest updates on plants and gardening.

So, now that we have a better understanding about RSS and what it can do, let’s move on to finding out how to incorporate the correct coding into a website in order to gain the noted benefits.

Google Feed API

Google has developed an exceedingly convenient method to display RSS feed data, via their Feed API feature. Using this technique, you can showcase any newsfeed by incorporating some simple Javascript lines into a web page.

To begin utilizing the Feed API, insert the following script into the Head section of your web page, beneath the meta tag area and just in front of the closing Head tag:

Then, insert the following code into the desired area of the web page:

<div id="body">
<div id="feedControl">Loading...</div>
</div>

After uploading the web page to the Internet, you should see the following addition:

The width of the four-stack vertical dynamic newsfeed is set at 440px by default, but it can be adjusted based on the size constraints of the given area within the page, or the HTML table, in which it is placed.

The newsfeed pointer rotates continuously between the news items, displaying a link and short summary for each.

Feed Customization

You can manually change the coding variables in the following expression:

As noted, you can raise or lower the set width of the display. The margins can also be adjusted. If, for example, you want to create more space at the top of the newfeed box, the ‘margin-top’ expression can be upped to 20px, or higher.

Changing News Sources

The newsfeed can also be updated to accommodate a new source very easily.

Say that you got tired of the BBC feeds, and instead wanted to incorporate news from CNN. The required adjustment would be made to the following line:

var feed =”http://feeds.bbci.co.uk/news/world/rss.xml”;

The CNN RSS code would be substituted so that the line looked like:

var feed =”http://rss.cnn.com/rss/edition_world.rss”;

A similar adjustment to display an international newsfeed from Reuters would entail the following change:

var feed =”http://feeds.reuters.com/Reuters/worldNews “;

Conclusion

As this brief tutorial demonstrates, it is both quick and easy to incorporate a newsfeed into your site. The above coding can be inserted into the home page, or any interior page.

adding new content is always a good idea, just as long as the content you add is original and unique.. why bother copy /importing fresh content from bigger sites? you will never outrank the bigger players

The Google snippet shows news only on the client site, the googlebot will not index the content.
Anyway nice idea to show interesting content to your visitors. David do you tried to change the style for the whole box?

Completely agree. This method would carry little if anything in terms of SEO. Much, much more beneficial to put in the effort and create high quality, unique content. That really will get you traction in SERPs. Nice post though, although I don’t agree with the content! 😉

jeff_DD

True, you are not going to get an SEO boost from this however any site that is useful to its community is certainly going to get plenty of shares via the social channels. Adding something like this can definitely help with that, if you are providing value to your community.

robert

I would think the links could get scanned and fed into another page that is pure html and will get crawled.

Hello everyone. This article is really informative, and moreover the article is given in a very easy language which is very easy to follow. Thanks for sharing this valuable article with us.

wookietv

hi, how would you add multiple news boxes of different feeds into a website?

robert

check out my code at socialcasket dot com I have multiple boxes set up.

Priyanka Ahuja

how did u get the content from dif new channels..can u help me with code?

Josh

How you do add the feed from larger sites but only about a certain topic? Such as CNN but only about say “Global Warming”. I don’t want all their stories only certain ones. Is there a way to do that.
Many thanks

hi, i want to add cnn technology rss feed to my website, but i’m not quite sure how to go about it. any suggestions would be great!

lepas lokan

Thanks for the free code. But how to make it reload the feed after some time or after refreshing the page? I find it only load the first load and just stays like that even after I refresh my page–and I know the source rss had changed.

BTW if you want to check my blog is at lepaslokan dot blogspot dot com.

Thanks again. It’s very useful 🙂

parthaprotimsarma

Really helpful.. Thank you very much..

Ruby Patel

Is it legal to post this content on our website????

Andrew McFadden

This is great, but how would I incorporate multiple feeds without just copying the same code 5x,

Also, I am trying to get feeds from tech crunch but this option does not show images or anything of that dort. How would I get it to show more of the article and/or images

Amir

Hey i have successfully installed your codes… I need feature image beside every post how can i get it??? The images should be related with the news itself

Hey WordPress lovers. Every month dozens of incredible free WordPress plugins are released by the community, and we’re here to bring them to you. This seems to be a month of small but useful utilities that only do one or two things, with a few exceptions. So go on. March on down to the list, and get to it! (I'm only a little bit ashamed of that pun.) WP NoteUp ... Notes! Alongside your posts and pages! Use them to remind yourself, or other authors, about things you'd put in a note. That's really all there is to...

WordPress plugins are coming out all of the time, right and left. Every day, they’ve got new ones in the WordPress plugin repository for the curious developer to check out. Over time, your average designer or developer will end up with a list of their favorites. Usually, they’re plugins that solve common problems, are up-to-date and well-maintained, with good support. With that in mind, we’re sharing a list of some of the best plugins out there. Disable Comments ... Disable Comments does......

When I first started out creating websites with WordPress, I was in awe of the depth and variety of plugins available. During those golden days I would willingly install just about anything that looked cool. Shortly thereafter, I was smacked in the head by reality. Stuff started breaking and seriously hurt my good time. It turns out that not every plugin is a great one. And there are times when it seems like the work we do is held together with bubble gum and duct tape. Everything works splendidly until it...

WordPress is undoubtedly one of the most popular tools on the Internet because it makes it so easy to get a functional web site up and running in such a short time. And then there are the plugins. If you want your WordPress site to do something then odds are there is a plugin that you can install to make your site do what you want it to do. But plugins pose a bit of a problem at times. Since they are created by third-party developers you never know what quality control practices are used and what security testing...

WordPress beginners have difficulty customizing their websites past simple text changes, especially if they have no background knowledge of HTML or CSS. WordPress page builder plugins allow just about anyone to build a stylish or professional looking web page, through a user-friendly interface - quickly, and without knowing HTML or CSS. Though it may seem like WordPress page builder plugins have usefulness mainly for the technically unsavvy, they can also make a WordPress developer’s job...

Oftentimes, setting up a WordPress website results in a haphazard scramble to configure enough of the right plugins to make the client happy, and address any specific needs they might have mentioned. But a failure to install certain plugins means the client will come back at you with questions as to why it wasn’t done in the first place. Though you’re probably happy to rectify the problem (and collect a little extra money on the project), going back in to install plugins can distract from more profitable...

In Part 1 of this series we took a look at how you can better secure your WordPress files during, and after, the installation of the software. But once you have the files hardened against different threats, it is time to start looking at some of the different plug-ins available that can help you further protect and secure your WordPress site. WordPress Firewall 2 ... Having worked with a company that deals with web application firewalls, I can tell you from firsthand experience that these are by far one...

There’s a goal behind every website, and a specific chain of events that must occur before each goal is accomplished. Whether you want someone to sign up for your email newsletter, or fill out a contact form, these things don’t happen without the proper triggers. Used strategically, WordPress plugins can assist with the realization of important goals. Here’s how to turn your website into a conversion machine with WordPress Plugins. Essential Grid ... Essential Grid is an all-around grid solution...

About

DeveloperDrive.com is a blog about web development from the makers of the popular web design blog WebdesignerDepot.com
Founded in 2011, we focus on the latest trends, tutorials, opinion articles as well as tips and tricks to empower our readers to become better web developers.