Created
February 27, 2019 12:42
-
-
Save lelandf/9a7ec660abd3581182f695a59ff57fee to your computer and use it in GitHub Desktop.
Milan Pro front-page.php with static page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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