Skip to content

Instantly share code, notes, and snippets.

@lelandf
Created February 27, 2019 12:42
Show Gist options
  • Save lelandf/9a7ec660abd3581182f695a59ff57fee to your computer and use it in GitHub Desktop.
Save lelandf/9a7ec660abd3581182f695a59ff57fee to your computer and use it in GitHub Desktop.
Milan Pro front-page.php with static page
<?php
/**
* This file adds customizations to the front page template on the Milan Pro Theme.
*
* @author Themetry
* @package Milan
* @subpackage Customizations
*/
//* Add Featured Content widget area to blog index page
add_action( 'genesis_after_header', 'milan_featured_content' );
function milan_featured_content() {
if ( is_active_sidebar( 'featured-content' ) ) {
echo '<div class="featured-area">';
dynamic_sidebar( 'featured-content' );
echo '</div>';
} elseif ( milan_has_enough_featured_posts() && ! is_active_sidebar( 'featured-content' ) ) {
get_template_part( 'template-parts/jetpack-featured' );
}
}
//* Run the Genesis function
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment