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.

27 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….

  12. On Laura said:

    This question doesn’t have to do w/ disabling right click but I wasn’t sure where else to post it. Hopefully, someone out there can help.

    I am wanting to remove the time from under the post titles? Right under the post title, automatically the date and time are inserted. I do not want my post showing the time, only the date. Where can I remove this feature?

    Thanks. ~Laura

  13. On Jared said:

    @Laura: that’s kind of tricky actually. the easiest way to get close to what you’re after is to go into “Settings” => “General” and under “Time Format” where it says “g:i a” or something like that, just delete the whole line and click save.

  14. On Anne Raker said:

    Thanks for all these tips! I did what you said to do to delete the time, and it got rid of the time, but the date still has a hyphen after it… how do I get rid of the hyphen? Thanks for your help!

  15. On Anne Raker said:

    Also, is there a way to center-justify the comments links at the bottom of each post, and the nav bar at the very top? I’m looking through all the tutorials, so if it’s in here somewhere and I haven’t stumbled on it yet, my apologies! :)

  16. On Jared said:

    @Anne Raker: add a line in your stylesheet on a new line that says:

    body.home .meta-inner { text-align:center; }

    that should do it.

  17. On Anne Raker said:

    Thanks – that worked perfectly! :) Any ideas about the hyphen, though?

  18. On Jared said:

    @Anne Raker: sorry, forgot about the hyphen. That’s actually quite complex for a non-developer to remove the hyphen. send me an email through the support tab with your ftp info and i’ll do it for you.

  19. On Julie said:

    I’m lost..I don’t even know where to start looking for this..is it under apperance? If so where..

  20. On Julie said:

    found it..my date and time are not moving over..

  21. On admin said:

    @julie: did you copy the correct version of the code above? one is just for the header, the other moves both over.

  22. On Yvonne said:

    I can’t get rid of the hyphen either can I send you my ftp info?

  23. On Rebekah Towers said:

    Hello Jared! Okay so I have added a contact page to my blog but if you continue to scroll down on that page it also shows my bio area and most recent post. How do I get all of that off of there and just have the contact page?

  24. On hillbillyduhn said:

    I found this very useful thank you, however, it aligned my post title, but not the date, what did I do wrong??

  25. On Play Poker Australia said:

    Hey just found your site, been looking around at a few websites but this post is one of the best I have read. Great work!

  26. On gosportsgames.info said:

    All I can say is wow. I have never ever checked out it that way, but I appreicate you posting it. I will continue to be a daily reader of the blog.

  27. On old friend slippers said:

    Big fan of this site, a bunch of your posts have really helped me out. Looking forward to updates!

Leave a Reply