Note that there are some explanatory texts on larger screens.

plurals
  1. POwordpress bootstrap slider carousel
    primarykey
    data
    text
    <p>I hope someone can help me on this, been searching the web for an answer. I use <a href="http://320press.com/wpbs/" rel="nofollow">http://320press.com/wpbs/</a> for my wordpress in localhost but it seems that the carousel is not working properly.</p> <p>Actrually I have to questions but the important part is the first one.</p> <ol> <li><p>How can I make the carousel call a specific category instead of displaying all post inside my wordpress</p></li> <li><p>You need to click the arrow so that the image slide will work, is there a way to set it to automatically slide?</p> <pre><code>&lt;?php $use_carousel = of_get_option('showhidden_slideroptions'); if ($use_carousel) { ?&gt; &lt;div id="myCarousel" class="carousel slide"&gt; &lt;!-- Carousel items --&gt; &lt;div class="carousel-inner"&gt; &lt;?php global $post; $tmp_post = $post; $show_posts = of_get_option('slider_options'); $args = array( 'numberposts' =&gt; $show_posts ); // set this to how many posts you want in the carousel $myposts = get_posts( $args ); $post_num = 0; foreach( $myposts as $post ) : setup_postdata($post); $post_num++; $post_thumbnail_id = get_post_thumbnail_id(); $featured_src = wp_get_attachment_image_src( $post_thumbnail_id, 'wpbs-featured-carousel' ); ?&gt; &lt;div class="&lt;?php if($post_num == 1){ echo 'active'; } ?&gt; item"&gt; &lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="&lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_post_thumbnail( 'wpbs-featured-carousel' ); ?&gt;&lt;/a&gt; &lt;div class="carousel-caption"&gt; &lt;h4&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="&lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h4&gt; &lt;p&gt; &lt;?php $excerpt_length = 100; // length of excerpt to show (in characters) $the_excerpt = get_the_excerpt(); if($the_excerpt != ""){ $the_excerpt = substr( $the_excerpt, 0, $excerpt_length ); echo $the_excerpt . '... '; ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="&lt;?php the_title_attribute(); ?&gt;" class="btn btn-primary"&gt;Read more &amp;rsaquo;&lt;/a&gt; &lt;?php } ?&gt; &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;?php endforeach; ?&gt; &lt;?php $post = $tmp_post; ?&gt; &lt;/div&gt; &lt;!-- Carousel nav --&gt; &lt;a class="carousel-control left" href="#myCarousel" data-slide="prev"&gt;&amp;lsaquo;&lt;/a&gt; &lt;a class="carousel-control right" href="#myCarousel" data-slide="next"&gt;&amp;rsaquo;&lt;/a&gt; &lt;/div&gt; &lt;?php } // ends the if use carousel statement ?&gt; </code></pre></li> </ol> <p>Really appreciate for your help! Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload