Site logo

Archived topic

Featured post with image next to title and excerpt

3 replies · Started by Daniel on January 28, 2021

Viewing posts 1–4 of 4

Hi!

I need the featured post to have a two columns design. First column with the image and another column with the rest of the information: title, excerpt and meta.

I'm going to use flexbox, so I'd need to create a new div to contain the entry-summary and the entry-meta divs. Is there a hook or snippet I can use?

The rest of the blog is in two columns with the image on top of the title and excerpt, so I need to change the design only for the featured post.

Hi there,

try this snippet to create your wrapper:

add_action('generate_before_content', function() {
	if (!is_singular() ) {
		?><div class="post-content-wrap"><?php
	}
},50);

add_action('generate_after_content', function() {
	if (!is_singular() ) {
		?></div><?
	}
},50);

Thank you, David!

That was exactly what I needed.

Glad to be of help.

This archived topic is closed to new replies.