Frequently Asked Questions:

How to center your post-titles

Someone just emailed me and asked how she would center her post-titles. I thought it was a good question, so I’m sharing the answer with all of you.

If you want to center your post-titles and post-dates, so they look like this:

Just open up your “Stylesheet (style.css)” with your Theme Editor (under the Design tab) and add a line at the bottom and paste in this code:

h2.entry-title, h3.entry-title, div.entry-date { /* center post titles & dates */
text-align:center;
}

If you only want the title centered and not the date, change it to this:

h2.entry-title, h3.entry-title { /* center post titles */
text-align:center;
}

Click update file and you’re set!

Questions? Instead of emailing for support, leave a comment below so everyone can benefit from any clarification.

11 Responses to “How to center your post-titles”

  1. On Angel said:

    Jared - I LOVE your tips! I hadn’t checked w/you site in a week or so and when I come back there are lots of goodies here. Thank you so much for all your hard work and helpful information! :)

  2. On Seth - Zelo Photography said:

    nice! Thanks for the info!

  3. On Stephanie Williams said:

    I tried this and it realigned my whole site. I pasted the code under the code “edit these to affect styling of Post Titles” and I pasted it at the bottom of the paragraph (line 103) and it realigned my whole site instead of just the post titles. What did I do wrong?

  4. On Jared said:

    Stephanie - try undoing what you did, then scroll all the way to the bottom of your stylesheet, put your cursor at the end, press return a couple times, and then paste the code in on a brand new line. if that doesn’t work, comment back here.

  5. On Dustin Francis said:

    When you do this and use the categories feature like my wedding categories for example, the post titles are on the left, but the date/time is still centered. Is there a way to remedy this? Thanks!!!

  6. On Stephanie Williams said:

    Hi Jared,

    I posted the code

    h2.entry-title, div.entry-date { /* center post titles & dates */
    text-align:center;
    }

    at the bottom of the stylesheet and nothing changed on the blog

  7. On Dustin Francis said:

    Stephanie…did you empty your cache, then refresh your page? Most of the time, that’s all you need to do to see the changes made if you follow Jared’s instructions. Hope that helps!

  8. On Jared said:

    Dustin, try changing it to this:

    h2.entry-title, h3.entry-title, div.entry-date { /* center post titles & dates */
    text-align:center;
    }

    I forgot about category pages.

    Stephanie, did you get it working?

  9. On Stephanie Williams said:

    Yes, it is working now. Thanks for the quick responses!!!

  10. On Jared said:

    by the way, if you want to UN-center them, just delete the lines of code you added.

  11. On Renee said:

    thanks for another great tip Jared….

Leave a Reply