Tag Info

New answers tagged

0

The simplest way to go about this is to use "the loop" to also output your columns. So each post is in a column of its own, and they simply stack up on each other. Then when you reach bootstraps smaller break points the posts on the right will move directly under the post on the left. Like the illustration below. Which is the behavior you want. ...


0

Here is a solution I also used in the past. This allowed me to use the slides in other places on the page as well as in tiled galleries or thumbnails and so on. <?php $indicators = array(); $slides = array(); $counter = 0; while ( $loop->have_posts() ) : $counter++; array_push($indicators, '<li data-target="#testimonials" ...


0

I don't really understand your code and use of your counters, but in general, I would not use counters for this job. You can simply access the $found_posts property of WP_Query and test against that Example: if ($loop->found_posts <= 1) { // Do something if you have no or only one post } else { // Do something if you have more than one post ...


1

You can use the condition <?php if($loop->post_count > 1){ /** * so show the carousel counter */ } ?>


1

Try the code below. <div class="container-fluid gray-section"> <div class="container"> <div class="row"> <?php $projects = get_posts(array('post_type'=>'project','posts_per_page'=>5, ...



Top 50 recent answers are included