WordPress.org

Support

Support » Themes and Templates » Custom Theme Development, Bootstrap Carousel Not Appearing

Custom Theme Development, Bootstrap Carousel Not Appearing

  • Hello,

    I am currently developing my first custom theme; I’m transferring a website I made in class using Bootstrap into a theme with custom WordPress content. I’m using a static homepage. In my original website, I used a Bootstrap carousel I found on Google, which was just some custom CSS and corresponding HTML based on the Bootstrap framework. I’ve tried implementing that into my front-page.php file but the slider will not show up.

    I’ve checked my source code and both the CSS and JS files are appearing on my page, so thats not the issue. Here is the code I’ve used to make the slider appear:

    <div id="myCarousel" class="carousel slide">
    			<div class="carousel-inner">
    				<?php $args = array(
    					'category_name' => 'Slider'
    					); ?>
    				<?php
    				$the_query = new WP_Query($args);
    				?>
    				<?php if( have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    				<div class="item">
    					<?php the_post_thumbnail(); ?>
    				</div>
    			<?php endwhile; endif; ?>
    
    			<a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a>
    			<a class="right carousel-control" href="#myCarousel" data-slide="next">&rsaquo;</a>
    		</div>
    	</div>

    You can find my webpage at http://www.testing.jaylaiche.com. Thanks for the help in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Theme Development, Bootstrap Carousel Not Appearing’ is closed to new replies.
Skip to toolbar