Meta Slider instead of Genesis slider
-
I’d like to set up a meta slider in a custom child theme based on the genesis framework. Could you please tell me how to modify my Functions.php to add in the Meta Slider? Here is the relevant section from my functions.php
add_action( 'genesis_after_header', 'genesisawesome_flexslider', 20 ); /** * GenesisAwesome Responsive Flexslider * * @since 1.0 * * @return null */ function genesisawesome_flexslider() { if ( ! is_home() || ! genesis_get_option( 'enable_homepage_slider', GA_CHILDTHEME_FIELD ) ) return; /* Custom Query Args */ $ga_slider_args = array( 'posts_per_page' => absint( genesis_get_option( 'homepage_slider_number', GA_CHILDTHEME_FIELD ) ), 'cat' => absint( genesis_get_option( 'homepage_slider_category', GA_CHILDTHEME_FIELD ) ) ); /* Creating new WP Query */ $ga_slider_query = new WP_Query( $ga_slider_args ); /* THE CUSTOM LOOP */ if ( $ga_slider_query->have_posts() ) { ?> <div id="aliphatic-slider"> <div class="wrap"> <div class="flexslider"> <ul class="slides"> <?php while ( $ga_slider_query->have_posts() ) { $ga_slider_query->the_post(); if ( $slide_image = genesis_get_image( array( 'size' => 'aliphatic-slider-image' ) ) ) { ?> <li> <a>" title="<?php the_title_attribute(); ?>"><?php echo $slide_image; ?></a> <div class="flex-caption"> <h2><a>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> </div> </li> <?php } } ?> </div> </div> </div> <?php }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Meta Slider instead of Genesis slider’ is closed to new replies.