How to edit layout of a particular post format?

Mostly you would just make CSS changes. For example, a post that has the aside format will have included in it’s mark-up a class of format-aside which you could override in your own CSS, whether it be by way of child theme support or CSS plugin.

I’ve only just been playing with this today (incidentally, which is how I came across this question).

Example:
You could hide the title of posts tagged with the quote post-format (ie format-quote) by including this in your CSS file:

.home .format-quote .entry-title {
    display: none;
}

This would then format that entry on your blog page / index to not include the title from the post, and would make the quote just appear as more of an inline quote between two posts.

Or you could include a background image or custom colour behind the post based on the format.

I haven’t completed it yet, but I’m working on a format to use the post title as the author of a quote, and the content to be the quote content, and the position the title under the quote in smaller than <h2> tags, or possibly just add an ::after element to maybe include the word “says” or “said” so that the quote field could be presented thus:

Isaac Newton said:

I can calculate the motion of heavenly bodies, but not the madness of people.

There isn’t a plethora of information out there, but here are a couple of links which go into a little further detail (the first being WordPress Codex):

WordPress Codex page on Post Formats
Elegant Themes Blog post: Creating Post Formats

Leave a Comment