//* Add portfolio body class to the head add_filter( 'body_class', 'charlotte_body_class' ); function charlotte_body_class( $classes ) { $classes[] = 'charlotte-portfolio'; return $classes; } //* Force full width content layout add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); //* Remove page elements remove_action( 'genesis_entry_header', 'genesis_post_info' ); remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); remove_action( 'genesis_entry_header', 'genesis_do_post_image', 5 ); remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); //* Display three column grid function charlotte_portfolio_grid( $classes ) { if ( is_main_query() ) { $columns = 3; $column_classes = array( '', '', 'one-half', 'one-third', 'one-fourth', 'one-fifth', 'one-sixth' ); $classes[] = $column_classes[$columns]; global $wp_query; if( 0 == $wp_query->current_post || 0 == $wp_query->current_post % $columns ) $classes[] = 'first'; } return $classes; } add_filter( 'post_class', 'charlotte_portfolio_grid' ); //* Add the featured image before post title add_action( 'genesis_entry_header', 'charlotte_portfolio', 1 ); function charlotte_portfolio() { if ( $image = genesis_get_image( 'format=url&size=featured-square' ) ) { printf( '', get_permalink(), $image, the_title_attribute( 'echo=0' ) ); } } genesis();