Tutorial Revision: I’ve changed my theme since this tutorial was written, but it is completely applicable to any wordpress theme that displays a tagline.
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.

This is a pretty easy modification, so let’s get started. I’ve included all needed files here as well.
< ?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{ on my site, and that’ll get you started!
padding-top:48px;
margin:0;
line-height:1em;
color:#ffffff;
font-size: 155%;
font-family: Georgia, "Times New Roman", Times, serif;}
I hope this helps, and if you have any questions, please let me know by replying to this thread!
Enjoy!
Nice script it seems. Though I got some problems.
How can it be that I get the following line as text instead of a socalled function with the quotes?
Would be glad if you could help me out on this one
Hi Edvin,
The answer is that you need to remove the space between the opening < and the question mark at the opening of the function:
< ?phpBasically, that extra space in there is causing the PHP to render as text. Just remove the space between the first < and the ? and you'll be all set!
For some reason, I am having issues putting functions within the code tag, so I'm not able to properly illustrate, but I've attached a text file with the proper code which you can copy/paste into your header file.
Thanks, Edvin, for this tutorial. It’s great!
But I’m running across a problem. I’ve done exactly what you’ve described above, yet the line showing up -instead of the random tagline that should be there- is listing my blog name instead.
I’m using Hemingway 0.19
Wordpress 2.1.2
The only difference is that my Wordpress content is not in a folder called blog, but directly in the root. Could this be the problem?
Thanks in advance for your help!