Skip to content

Instantly share code, notes, and snippets.

@davidperezgar
Created November 11, 2016 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidperezgar/f38647aac2c85797d82fb00c189fef4d to your computer and use it in GitHub Desktop.
Save davidperezgar/f38647aac2c85797d82fb00c189fef4d to your computer and use it in GitHub Desktop.
Genesis Revolution slider in home page, featured rest
//* 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