/ Published in: PHP
For when you really just need a short description field along with a title for your slideshows. Just drop this into the functions.php and meteor-slideshow.php in the theme folder.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//add to functions.php add_post_type_support('slide', 'excerpt'); //template loop for content slides 'post_type' => 'slide', //'slideshow' => $slideshow, 'posts_per_page' => $options['slideshow_quantity'], 'orderby' => 'ID', 'order' => 'ASC' ) ); // Loop which loads the slideshow while ( $loop->have_posts() ) : $loop->the_post(); 'class' => "imageItem alignleft", 'title' => get_the_title( $post->ID ) ); // Adds slide image with Slide URL link $slide_img = '<a href="' . get_post_meta( $post->ID, "slide_url_value", $single = true ) .'">' . get_the_post_thumbnail( $post->ID, array(285,200), 'featured-slide' ) . '</a>'; $slide_desc = get_the_excerpt( $post->ID ); $result .= '<li class="royalSlide"> <div class="centeredSlide" style="margin-top:28px;"> <div class="slideTextBlock"> <h4 class="coda">' . get_the_title( $post->ID ) . '</h4> <p>' . $slide_desc . '</p> </div>' . $slide_img . ' </div>'; endwhile;