ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • HubPages Tutorials and Community»
  • Official HubPages Help»
  • Learning Center

Video Tutorial: Easy Way To Get More Traffic To Your Hubs And Their Earning Potential from your own website or blog.

Updated on September 20, 2012

A Nice Professional Way Of Publishing Your Hubs On Your Website (Not in Video))

You can do all of this for your own hubs just by following the advice in the video and taking the code below.
You can do all of this for your own hubs just by following the advice in the video and taking the code below.

Another example of what your hubs can look like on your website.

This has links back to your hub.
This has links back to your hub.

My fellow Hubbers, in thus hub, I explain how to get your own hubs onto your website or blogs. I know there are a few hubs out there on getting traffic, but I have yet to see a video that shows you how to publish your own hubs on your website or blog.

I have completed some computer programming and am giving it to you for free that will help you get traffic back to your Hubpages profile and even better, links to each of your most recent hubs. Even better, I am explaining all of this to you in a video as well. You also have all the code you need below. Just change one line of code and you are done.

Bottom line: I am going to give you all the code you need. This is not about teaching any computer programming. I have already done the coding and am giving you the program. All you need to do is change exactly one line and plug in your Hubpages address and your website will have links to your individual hubs. How cool is that?

If you can stay with me on this hub, I guarantee that you will have everything you need to publish your Hubpage links on your own website or blog and get more traffic to your hubs.

Increased SEO Benefits too!

I know that Hubpages promotes search engine optimization for each of our hubs and that is important for performing well as a hubber. Well, since you will be linking to your hubs from your own website, you will be performing one of the most strategic search engine optimization techniques that have stood the test of time: link development. Link development is simply creating a group of links from different websites and since you will be linking to your own hub pages account, you increase your link development.

If you need any help or support, I am here, just ask in the comments of this hub. I will offer you whatever help I can.

Ok, let's get into it. Are you ready?

First of all, this is all done in the web development language called PHP. As mentioned, I have already done all the PHP, so all you simply have to do is copy the code below and paste it on one of the web pages on your website or blog and your links will magically appear as you add hubs.

Step 1: Create a web page on your website.

Call it anything you would like. How about: hubpages.php? Your web page needs to have an extension of .PHP. A file ending with .html or .htm will not work.

Step 2: Copy this code onto your new web page:


$hubpages = "";			  

			  $xml = simplexml_load_file($hubpages);
				foreach ($xml->channel->item as $item) {
					$title = ucwords($item->title);
					//$title = fix(str_replace("'","''",$title));
					$link = $item->link;

							foreach($item->enclosure[0]->attributes() as $a => $b)
								if ($a=="url")
									$mp3="<a href=\"$b\">Download MP3</a>";
					} else {
					$today = Date("m/d/Y");

					//$desc = fix($item->description);
					$desc = $item->description;
					$desc = strip_tags(str_replace("'","''",$desc),"<img>");
					$pubDate = $item->pubDate;
					$cm = convertedMonth(substr($pubDate,8,3));
					$m = substr($pubDate,8,3);
					$d = substr($pubDate,5,2);
					$y = substr($pubDate,12,4);
					$mysqlDate = "$y-$cm-$d";
					$regularDate = "$cm/$d/$y";
					$postAge = ($epochToday-$epochPubDate)/86400;

					echo ("
					<div class='blogpost'>
					<a href='$link' target='_blank' class='posttitle'>
					<br />

					$categories = $item->category;
						echo "Categories:<br/>";
						//echo "<ul>";
						foreach($categories as $cat)
							//echo "<li><a href='$cat' target='_blank'>$cat</a></li>";
						//echo "</ul>";

function convertedMonth($m)
		case "Jan":
		return 1;
		case "Feb":
		return 2;
		case "Mar":
		return 3;
		case "Apr":
		return 4;
		case "May":
		return 5;
		case "Jun":
		return 6;
		case "Jul":
		return 7;
		case "Aug":
		return 8;
		case "Sep":
		return 9;
		case "Oct":
		return 10;
		case "Nov":
		return 11;
		case "Dec":
		return 12;

function formattedDate($d)
		$ex = explode("-",$d);
		return $ex[1] . "/" . $ex[2] . "/" . $ex[0];


Step 3: Change my username to your username on Line 3

Ok, although the coding is done, you need to change line 3 from "hotwebideas" to YOUR Hubpages username. Otherwise, you will have my hubs on your web page and you don't want that (but it would be nice) LOL.

So, if for example, your username is SuperHubberYo123, change the line that reads:

FROM: $hubpages = "";

TO: $hubpages = "";

It is really that simple.

Step 4: Optional, dress up your hub to look nicer

This step is optional, but if you know CSS or a web designer who knows CSS well, you can make your hub links look as professional as you'd like.

Some Additional Rules and Guidelines

  1. As I mentioned above, your file needs to end with .PHP and not .html or .htm. With that said, your web hosting company needs to support PHP. Otherwise, the PHP extension will not work. Most web hosting services like GoDaddy, Bluehost, and 1and1 all offer PHP. You can check with your hosting company if you are unsure.

    Again, you don't need to know PHP. I have already done all the coding for you. Just change line 3 to your own Hubpages username as mentioned above and it should work.

Do you need help, support, or assistance? I am here to help!

If you need some assistance with this, please leave your question or issue in the comments and I will do my best to help you solve this issue.

Also, if you know how to solve this, feel free to help out with your comments as well.

That's it and all there is too it. I hope this brings some more traffic to your hubs from your website or blog.


    0 of 8192 characters used
    Post Comment

    • hotwebideas profile image

      Bruce Chamoff 5 years ago from New York

      @tjdavis: Thanks! You can put this anywhere on your blog inside the PHP files. If you have Wordpress, you can add it to the sidebar.php or any of your Wordpress theme files.

    • profile image

      aHappierLife 5 years ago

      I think this is one of the most useful article I have read about increasing traffic, concise, and simple and easy to understand even for people who are not familiar with the technical languages. I voted this Useful!

      Thank you!

    • tjdavis profile image

      Teresa Davis 5 years ago from Moscow, Texas

      I understand the code..just now sure where to place it on my blog? Do I need to make a complete page for only my hub rss feeds or do they go on each page of my blog? Can I place an rss feed on like google+ or facebook or twitter and if so how would I do that?

    • hotwebideas profile image

      Bruce Chamoff 5 years ago from New York

      Thanks, Jackson. Let me know if you need any help on this.

    • profile image

      Jackson Mills 5 years ago

      I don't know PHP, but I heard good things about the RSS feeds and I want more traffic to my hubs. How do we get PHP on our web servers?

    • hotwebideas profile image

      Bruce Chamoff 5 years ago from New York

      Yes, absolutely. Hubpages gives us the RSS feed. Not many people are using it. I hope that can change when people see the benefits of using the Hubpages RSS feed to promote traffic to their hubs.

    • profile image

      WebDesigner4000 5 years ago

      I promote some clients on hubpages. So, I can simply take the code and using RSS, publish it? Awesome!

    • hotwebideas profile image

      Bruce Chamoff 5 years ago from New York

      Thanks, Rosa. Yes, RSS feeds are powerful and they are very important for Hubpages traffic.

    • profile image

      Rosie Park 5 years ago

      I did not know you can do that with RSS feeds. Thanks for the code. Great tutorial.

    • hotwebideas profile image

      Bruce Chamoff 5 years ago from New York

      Oh, you mean, getting paid by Hubpages to write hubs? Absolutely! All you need to do is sign up for Hubpage's Ad Sharing Program. Once your Hubpages account hits $50 you get paid on the 28th of the month.

      I just visited your Hubpages profile and noticed that you have not written any hubs yet, but once you do, you will start to see earnings in your Hubpages Earnings page. It is really small in the beginning, but the payments start racking up fast.

      Danielle, let me be the first to say: Welcome to Hubpages!

    • danielle2838 profile image

      danielle2838 5 years ago from New Orleans, Louisiana

      Thank you. I was wondering how this works. It said "get paid to write." I do this all the time for free.. just wondering if the payment part was true. thanks for clearing that up! ;)

    • hotwebideas profile image

      Bruce Chamoff 5 years ago from New York

      Hi Danielle. No, I am not getting paid at all. I am sharing this with my fellow hubbers.

    • danielle2838 profile image

      danielle2838 5 years ago from New Orleans, Louisiana

      are yall really getting paid to do this??

    • hotwebideas profile image

      Bruce Chamoff 5 years ago from New York

      Hey Anamika, First of all, congrats on your new domain name. I look forward to seeing your content website.

      And yeah, this may look like a foreign language at first, but it is still pure English. LOL...I know it can look daunting at first, but it is really not, because the benefits outweigh the challenge..

      In a nutshell, I am basically saying that you can put the code on any web page on your website and all of your latest hubs will display.

      I am willing to help people with this, because I believe that this will help Hubbers get more traffic to their hubs from their websites and blogs.

    • Anamika S profile image

      Anamika S 5 years ago from Mumbai - Maharashtra, India

      This still sounds like foreign language to me. I just bought a new domain to promote all my content and this should help. I just need to get someone else to do it. Thanks for your effort! Voted up useful.