[Resolved] Featured post with image next to title and excerpt

Home Forums Support [Resolved] Featured post with image next to title and excerpt

Home Forums Support Featured post with image next to title and excerpt

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1636697
    Daniel

    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.

    #1636785
    David
    Staff
    Customer Support

    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);
    #1637401
    Daniel

    Thank you, David!

    That was exactly what I needed.

    #1637454
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.