October 22, 2019

How to Justify All Posts in your WordPress Blog

We know by default the wordpress justifies text left, but that left justification leaves the text uneven towards the end of the line and across images. You can justify each paragraph manually in the wysiwyg editor but thats also a tedious task. Imagine if you had 1000 posts and now you would have to edit them manually. Not worth the effort.

Don’t be afraid its a simple CSS fix and you can do it in 2 minutes. By doing this fix all your existing posts and new posts will be justified.

Step1.)   Goto Appearance -> Editor

By default this will show the files of your current theme files.

Step2.) Locate the stylesheet, it will be at the bottom of all the files and typically the name is style.css

Step3.) Clicking on style.css will open it in the windows and will show lots of code.  Don’t worry and just search for

.post if you find a block of post then add the following code in the space 

.post{ text-align: justify; }

if .post is not present then add the full text show in the next blockquoate to justify all the posts in your wordpress blog.

.post{ text-align: justify; }

Note: Some theme provide advanced CSS options, you can paste the above code in them as well.

 

Hope this solves your problem and all posts are now justified in your wordpress blog.

 

Akash Deep Singh

|| Eat Packets || Drink Management || Sleep Virtual || Work Linux || Think I.T. || Love MAC || Look After Windows || Dream APPS ||

View all posts by Akash Deep Singh →

8 thoughts on “How to Justify All Posts in your WordPress Blog

  1. Hello,

    I’m not seeing an edit section in my appearance tab in wordpress. Am I blind? I don’t even know where the style.css section is to add the code to make this my default. Is it the theme I’m using?

    I’m so over manually setting justify on each post. Bigger fish to fry, you dig?

    yours,
    James

  2. Okay I found the css, but there’s no code in there at all. Just directions to add info in the box. I tried adding the above code and nothing changed when I tried to write a new post. Any ideas?

  3. CSS must have some sort of code in it. Sometimes the themes use multiple CSS.
    Are you using a premium template, they generally do have multiple css files.

    If there are directions then look carefully if they tell you which file to edit.

    Thanks

  4. Excellent tip. I’m surprised one skilled geek did not put it into a plugin yet.
    Worked fine in my premium theme CSS Customizer.
    Issue is that posts titles go justified too even in widgets, but only when a single post is displayed. I tried to go deep in theme’s css files to look for a workaround but title keep justifying. I’ll have to mess up with CSS for sure.

  5. Hi, I was able to did this in my themes additional CSS with your easy to follow instructions. However, my titles on my home page are now also fully justified which looks really odd on the two coloumn blog roll. Could you tell me a code to make the title left justified?

Leave a Reply

Your email address will not be published. Required fields are marked *