Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Alright, I have almost finished up a clients project in WordPress, but I have hit a wall. I am not really great with jQuery (and I have yet to find a plugin to achieve what they are looking for). The client wants an automatic slider on the homepage that pulls in featured posts out of their five categories. I have scoured the net for plugins to achieve the "look" they want, but to no avail.

The look in question can be seen here.

Does anyone know how to go about this?

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

This is one of those things you probably have to do yourself, even though there are some slider plugins, they are difficult to customize.

Using a jquery slider is pretty straightforward, they are usually just controlled with ID's and CLASS's, so you can wrap any WordPress code, for instance a wp_query (for featured posts).

toscho's answer pretty much covers it, I tend to use Jquery Tools a lot since it has great docs and tons of functionality, http://flowplayer.org/tools/index.html

share|improve this answer
add comment

Check out the AnythingSlider for WordPress plugin. Should do everything you need it to do.

share|improve this answer
    
Yeah, I ended up using the Slides.js and wrapping my different queries with the divs. Thanks for all the help. –  Louis Stephens Jul 25 '11 at 13:16
add comment

I have used the Anything Slider to do this. A checkbox added to the post editor …

enter image description here

… and a simple query later …

// excerpt from my slider class
public function list_slider_items()
{
    $posts = get_posts(
        array(
            'meta_key' => 'featuredpost'
        ,   'meta_value' => 'on'
        )
    );

    if ( empty ( $posts ) or ! is_array( $posts ) )
    {
        print '<!-- no posts found -->';
        return;
    }

    $out = '<ul id=slider class=noprint>';

    foreach ( $posts as $post )
    {
        $out .= '<li>' . get_the_post_thumbnail( $post->ID, 'slider-img' )
            . '<span class="slider-cat-list">'
            . get_the_category_list( ' · ', 'single', $post->ID )
            . '</span>'
            . '<h2><a href="' . get_permalink( $post->ID ) . '">'
            . get_the_title( $post->ID )
            . ' <span class=more-link>Weiterlesen</span></a></h2></li>';
    }

    print $out . '</ul>';
}

… and it is nearly done.

You have to tweak the stylesheet very much. It’s a mess. But in the end you get a slider that can contain any HTML, is usable for keyboard users and fits to a percentage width.

share|improve this answer
    
Thanks toscho. I will definitely give it a go. Just curious, how did you add the check box? –  Louis Stephens Apr 25 '11 at 2:19
    
@Louis Stephens The class for meta boxes is part of my private theme framework. Strange, right now I cannot find a good tutorial for that … but there are plugins to create such a box from the backend, for example More Fields. You may take a look into the source code of these plugins. –  toscho Apr 25 '11 at 9:49
    
Yeah, I am still struggling with the slider (actually have not even started on it). You can see a screenshot of what they want below cl.ly/6Ry7 –  Louis Stephens May 9 '11 at 0:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.