• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

No Sidebar Pro – Change Featured Image To Display Full Width On Front Page

By default, the No Sidebar Pro child theme by StudioPress displays full width for the most recent post and then in a grid for all other entries in a loop like you see in the following screenshot:

This tutorial provides the instructions to modify the code which enables you to display the featured image on all post entries, full width. The images will display full width on the 1st page of the front page like you see in the following screenshot:

The 2nd and subsequent pages will display the default which you see in the 1st screenshot at the beginning of this tutorial.

Here’s the instructions:

Simply change the code for the ns_post_class function which starts on line 81 of front-page.php to the following:

function ns_post_class( $classes ) {

    global $wp_query;

    $classes[] = 'first-featured';
		
    return $classes;

}

No Sidebar Pro Theme

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems