Archive for PHP
Insert RSS into wordpress posts or pages
Posted by: | Comments
Today I had to find a quick RSS reader that worked in wordpress pages. I searched and I searched for a plug-in that could process my RSS feeds from Linkshare affiliate network. None of them processed my feeds (in particular iTunes) , the URLs from Linkshare do not end in a .xlm extension and for some reason none of the plug-ins could handle that. I had 2 choices, fix it or find a faster way; I went with the faster option as my client was in a rush.
I stumbled across the google News Bar Wizard this wizard generates Java script to be used on your page template.
I used the generator to make the base code then just inserted my Titles and RSS URLs in place of Google’s generated information. You can download my template file with the link below:
Download PHP wordpress page template here
- Edit Line 29 , replace GOOGLE API KEY HERE with your google AJAX API key
- Edit line 41 and replace TOP TITLE HERE with the title of your RSS feed
- Edit line 41 and replace YOUR FULL RSS URL HERE with the URL of your RSS feed
- Edit line 46 and replace SECOND TITLE HERE with the second heading for your RSS feed
This all took me 30 mins to do and it gave me a result that the client was pleased with – have a peek at music club’s page, they use Linkshares iTunes RSS feed for top 25 new releses.
It should take you 10mins with these instructions, I hope it helps.
PHP Redirect
Posted by: | Comments
I had to setup a rederect file on a clients site today in order to pass a tracking value from a site that would not allow long url’s and I found this perfect one line of code :
Time Required: 1 Minute
The Code:
<?php
header( ‘Location: http://www.yoursite.com/any_page.html’ ) ;
?>
You need to replace the URL above with the URL you wish to direct to.



















