Search for it:
Advanced Search

Comments

Wordpress Random Tagline Tutorial

In the spirit of the open source community, which has benefited me so much over the last 10 years, I humbly offer up a tutorial that will allow you to randomize your tagline within Wordpress.  I use the Hemingway theme, and you’ll notice that the tagline in the header of my site displays a different saying on each page refresh as illustrated in the screenshot below.

My tagline

This is a pretty easy modification, so let's get started. I've included all needed files here as well.

  1. The first thing you should do is download the zip file which contains the actual files you'll need to generate the random tagline
  2. Unzip the archive and make sure you maintain the directory structure
  3. Now the fun stuff begins. Open quotes.dat in a text editor, preferably one that shows line numbers, and replace my own mayhem with your own. Be sure to avoid empty lines, as they will "display" anyway, and you won't see any taglines when that happens.
  4. Upload quotes.dat to the root directory of your blog. I've assumed that you have put Wordpress in a folder called "blog."
  5. Upload quotesmain.php to your hemingway theme folder. You do not need to make any changes to this file.
  6. Now, go to you Wordpress Admin, select Presentation > Theme Editor > Header. Once again, I'm using the Hemingway theme, so I'll assume you are as well. This tutorial, however, will work for any theme you choose that supports a tagline.
  7. At approximately line 56, replace < ?php bloginfo('description'); ?> with < ?php include('quotesmain.php'); ?>

That's it! Refresh your page and you should start seeing the random taglines show up. You can, of course, style your tagline anyway you'd like. To do that, simply go to Presentation > Theme Editor > Stylesheet and modify the #header p rules anyway you like.

For example, I use #header p{ padding-top:48px; margin:0; line-height:1em; color:#ffffff; font-size: 155%; font-family: Georgia, "Times New Roman", Times, serif;} on my site, and that'll get you started!

I hope this helps, and if you have any questions, please let me know by replying to this thread!

Enjoy!

Posted by Gino Guarnere on 10/31 at 09:39 PM

Listen Up: We moderate all comments. If you plan to use the commenting area solely to pimp your own website, please know that we will not approve it. Only context-sensitive, genuine-interest comments will make the cut. Please don't make dopey comments that are irrelevant just so you can post the name of your website.

Name:

Email:

Location:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?

Submit the word you see below:


Content created by Pixeldust Films | Site Design, Pixeldust Films based on a concept from Rambling Soul. | Contact Gino to start a project