Created
November 11, 2016 12:20
-
-
Save davidperezgar/f38647aac2c85797d82fb00c189fef4d to your computer and use it in GitHub Desktop.
Genesis Revolution slider in home page, featured rest
This file contains 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
//* Adds featured image in home | |
add_image_size( 'destacada_pagina', 1440, 470, true ); | |
add_action('genesis_after_header','cmk_home_img'); | |
function cmk_home_img() { | |
if ( has_post_thumbnail() && !is_singular() && !is_home() && !is_front_page()) { | |
echo '<div class="miniatura text-center">'; | |
the_post_thumbnail('destacada_pagina'); | |
echo '</div>'; | |
} elseif (is_home() || is_front_page()) { | |
echo '<section id="slider">'; | |
if (function_exists('putRevSlider')) | |
putRevSlider("inicio", "homepage"); | |
echo '</section>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment