Pushing the eBook site

Written by: burt
Date: September 10, 2007
Filed under: Case Studies
Trackback · Comment

I wanted to push the eBooks site a little more than I have been. As the readers of this blog are a perfect for the subject matter of the eBooks, I decided to make a couple of changes to this website. Have you noticed them?

Change 1 was to take all of MY posts and replace the usual footer with a new one! It was quite easy and consists of a piece of code to determine the post author and a piece of PHP code to display an eBook Cover on a random basis.

The usual footer looks like this;

footer1.gif

On my posts, the footer looks like this;

footer2.gif

As you can see, quite a difference! It is also possible that the graphic that shows might be one of the other eBooks that I have available. This was actioned using a small piece of PHP code to grab filenames that have a certain "name", then print out a random filename that matches. 2 lines of PHP code. Easy as 123.

The actual code that determines the author is also rather simple;

PHP:
  1. if ((is_single()) && ((get_the_author() == "burt"))) {

This code was added to the template (footer.php) file. Obviously, you would want to change the username to suit your own name!

Change 2, I just this moment actioned so have not tested to see if it works. I hope it does. I simply amended the Wordpress RSS feed to add in an extra "item", as follows;

PHP:
  1. <item>
  2. <title>GET YOUR FREE EBOOK TODAY!  LEARN SOMETHING NEW...</title>
  3. <description>Get a quality eBook for FREE each and every month.  Sign up at www.ideasfestival.org - it's free and simple!</description>
  4. <link>http://www.ideasfestival.org/?rss</link>
  5. </item>

I added this right above the following code in wp-rss.php

PHP:
  1. </channel>
  2. </rss>

It looks as though it works, as I now see this in Firefox Live Bookmarks;

rss1.gif

However, I am unsure if other feedreaders will see the same effect! If anyone is using other feedreaders, please let me know whether or not you see 5 blog links + 1 "free ebook" link in your feedreader... Thanks!

Comments

  1. Comment by Chance — September 10, 2007 @ 7:32 pm

    It reloaded your last 6 feeds with the ad at the bottom in Google Reader- Also, you are doing partial feeds now- I don't know if that was intended or not, but I liked the full feeds better :p

    Good idea though- I like the idea of automatically inserting it, and its not that obtrusive provided it does not do the whole "last six feeds and an ad" every time you make a new post in my reader.

  2. Comment by Gary — September 10, 2007 @ 9:20 pm

    JC, partial feeds wasn't intended. I'm not quite sure how that happened. Will look at it tomorrow…

    Thanks for letting me know.

Leave a comment



Did you enjoy reading this?
Please consider subscribing to our RSS Feed!


Subscribe by Email
Get notified by email every time we update this Blog!


 

Subscribe (RSS)

Recent Comments

Sponsored By

What Others Are Saying