Blog category specific slider for wordpress home page?

I was hoping someone might be able to point me in the right direction or provide some guidance. I am currently using a responsive slide plugin for my home page slider. It works great but it creates a custom post type. That is fine, but I would like, instead, to run my blog posts through it. Essentially I would like to create a category and name it “slider” and have the blog posts from that category use the slider. The reason I am using this specific slider is because it fits in with the responsive theme. Any easy way to do that using my current setup (code below) or can someone point me in the right direction on how to accomplish this? Thanks in advance! (website isn’t live, it’s on my computer’s localhost)

Using shortcode on front page of theme

Read More
           {<div id="flexfix" class="span11"> 
           <?php do_shortcode( '[responsive_slider]' ); ?>
           </div><!-- End Flexslider -->}

Responsive slider query

{function responsive_slider() {

$slides = new WP_Query( array( 'post_type' => 'slides', 'order' => 'ASC', 'orderby' => 'menu_order' ) );

if ( $slides->have_posts() ) : ?>

    <div class="responsive-slider flexslider">

        <ul class="slides">

        <?php while ( $slides->have_posts() ) : $slides->the_post(); ?>

            <li>

                <div id="slide-<?php the_ID(); ?>" class="slide">

                    <?php global $post; ?>

                        <?php if ( has_post_thumbnail() ) : ?>

                        <!--edited by david crothers 11/8/12-->
                            <!--<?php echo get_post_meta( $post->ID, "_slide_link_url", true ); ?><?php the_title_attribute(); ?>-->
                            <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
                                <?php the_post_thumbnail( 'slide-thumbnail', array( 'class' => 'slide-thumbnail' ) ); ?>
                            </a>

                                <h2 class="slide-title"><?php the_title()?></h2>

                        <?php endif; ?>


                </div><!-- #slide-x -->

            </li>

        <?php endwhile; ?>

        </ul>

    </div><!-- #featured-content -->}

Related posts

Leave a Reply

1 comment