How to create Carrousel with query post content in Wordpress?

Asked

Viewed 183 times

-3

I want to create a horizontal Carousel like this website.

But I want to pull the Thumb, title and posts of a certain category.

  • 2

    Please specify your question better, as there are numerous answers to it.

  • You should be more specific in your question...

  • Dude, it improves your question, because it’s not very clear. I can’t understand what you want and I’m not the only one. Otherwise, soon people will end up closing the question.

2 answers

2


For the carousel you can use the Bootstrap or the jCarousel. And adapt the effect with some jQuery plugin of your choice.

And to do the Wordpress part you can use a code similar to this:

<?php
    query_posts ( 'cat=1&posts_per_page=3' );
    if (have_posts ()) : while ( have_posts () ) :
        the_post ();
        $thumb = wp_get_attachment_image_src ( get_post_thumbnail_id ( $post->ID ), 'thumbnail' );
        $url = $thumb ['0'];
?>
<!-- Carrosel aqui! -->
<?php endwhile; endif; ?>

1

If it’s the case to really implement the effect you want I can’t help you but have some information I think important to you.

This one recent article that says this effect you intend to do has some disadvantages that may lead you to "go out of fashion" this year.

According to the article the time set up for the images to pass to the user in general is either very short or very long, proving its experience with the site.

The article also says that a good introduction video can be a better alternative to the effect.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.