How to make Content width smaller then Featured Image in Genesis WordPress

Firstly, you need to move up Featured Image at the top of title both in Category page and Single page. To do that add below code in your function.php file

// Register a custom image size for Singular Featured images
add_image_size( 'singular-featured-thumb', 800, 250, true );
 
add_action( 'genesis_before_entry', 'sk_display_featured_image' );
function sk_display_featured_image() {
    if ( ! is_singular( array( 'post', 'page' ) ) ) {
        return;
    }
    if ( ! has_post_thumbnail() ) {
        return;
    }
    // Display featured image above content
    echo '<div class="singular-featured-image">';
        genesis_image( array( 'size' => 'singular-featured-large' ) );
    echo '</div>';
}

Add below CSS line in your style.css file.

Change .category-uncategorized to the Category you want to apply the modification. 'uncategorized' is the slug for your Category.

.category-uncategorized .entry-content, .category-uncategorized .entry-header {
	padding:0 30px;
} .category-uncategorized .entry-footer { 
	padding:0 30px 10px 30px; 
} .attachment-large , .post-image, .size-singular-featured-large {
	padding-bottom: 30px; padding-left:-20px; 
} 
/* Small Devices, Tablets &amp;amp;amp;amp;amp;amp;amp; Phone */ 
@media only screen and (max-width : 768px){
	.category-uncategorized .entry-content, .category-uncategorized .entry-header { 
		padding: 0px; 
	} .category-uncategorized .entry-footer { 
		padding: 0px; } 
	.attachment-large , .post-image, .size-singular-featured-large { 
		padding-bottom: 30px; 
	} 
}
Copyright © 2024 Siam Naulak.
magnifiercrossmenu