You are here: Home » Extending WordPress » DIY WordPress: Moving The Author’s Byline In WordPress Journalist Theme

DIY WordPress: Moving The Author’s Byline In WordPress Journalist Theme

by Dave Doolin on August 18, 2009 · 1 comment

(Reading time: 4 – 6 minutes)

The Journalist theme for WordPress is very popular, for good reason. It’s simple, clean, and to the point. Even Mark Jaquith, a highly highly experienced WordPress developer uses journalist for his WordPress.com blog.

Byline under post

Byline under post

There’s one part of the Journalist design that I don’t particularly like, and that’s having the author’s byline at the bottom of pages and posts. This morning, I set out to fix that. Moving the Journalist theme’s author byline turned out to be fairly easy, and I’ll show you how to do just that below.

Brief intermission for Chillout and Ambient music fans (all you others skip over): Check out Low Mercury from Groovera.com on iTunes radio (Click on the “Listen Now” link for browser streaming). No, this isn’t an affiliate link… but it is a promotion link. If you like it, consider subscribing at any level of commitment. I’m in at “Icicle” level. Listening to Low Mercury helps me write blog posts like this one. So helping Groovera helps me help you! What a deal! (Just so you know, I’m musically multi-dimensional: I drove into San Fran listening to The Allman Brothers Band “Live at the Atlanta Pop Festival.”).

Move the author’s byline

First step: back up everything before doing anything else.

Second, consider where you are going to do this work. I did it right on the server, live, but I’ve been programming long, long time. If you’re not comfortable fixing stuff you break, consider making the changes locally, then uploading the modified files to your host. (You might consider modifying the theme name as well, to keep track of what you have changed.)

In any case, where ever you decide to work, you will need to change 5 files, all in the same way:

  • index.php: This is your main website display.
  • single.php: When you click on a title link, this is php file that gets served.
  • page.php: Default layout for pages.
  • archive.php: When you view a category, this file lays it out for you.
  • search.php: The results page for a search on your website.

As it turns out, you need to make the same change in each file, except that the code is going to look slightly different in each file. I won’t go into the technical details on why having file layout handled by more than one PHP file is inconvenient. There were likely constraints dictating this approach in the WordPress framework when the theme was written. In any case, it’s no big deal, we can handle it.

What we need to do is find the block of PHP code that displays the author information. Let’s start with index.php. Your file should look very similar, but probably not exactly the same as the screenshot below. I usually tinker a bit with themes to make the format more readable, so there may be slightly different layouts, but all the pieces should be in the same order.

Find the author formatting block

Find the author formatting block

After you move it, you should have something similar to this:

Byline under post title

Byline under post title

Simple theme changes are easy

Byline now under title

Byline now under title

Now that you have finished with index.php, you need to make the same kind of change in each of the other 4 files: archive.php, single.php, page.php and search.php.

Journalist is cleanly coded overall, but you will notice that each file has a slightly different code formatting layout, and none of them will look exactly the same as my screenshots. Don’t be rattled. Figure it out using the class names and you will be fine.

You can see the result in the screenshot above. Perfect!

Was this enough? Or is this just too boring? If you feel compelled to spice up your byline even more, you might be interested in “Styling The Author’s Byline In WordPress Journalist Theme In 3 Steps.”




Would you like more? Send me a letter...
"Hi Dave,
Website In A Weekend seems pretty cool. I'm serious about this WordPress and web stuff, and I'd like to keep up with it. My name is and my email address is . I'm comfortable with email newsletters. I know you will protect my privacy, and that I can unsubscribe at any time. "

Previous post:

Next post: