F
F
fisherspoons2016-03-21 01:44:25
WordPress
fisherspoons, 2016-03-21 01:44:25

WordPress posts?

There is a layout on Bootstrap. How to display posts in WP if the first post has col-lg-offset-1, and the next. there are no indents. And each block inside has its own separate class, on which a picture is hung as a background.

<?php if( have_posts() ) : while( have_posts() ) : the_post(); ?>
                        <div class="tour_block_cel col-lg-2 col-lg-offset-1 col-sm-6  col-xs-12">
                            <div class="block_tour">
                                <div class="img_tour1 text-center">
                                    <a href="#"><span class="caret"></span></a>
                                    <p class="button"><a class="btn btn-success" role="button">book now</a></p>
                                </div>
                                <div class="text_tour text-left">
                                    <h3><?php the_title(); ?></h3>
                                    <p><?php the_excerpt() ?></p>
                                </div>
                            </div>
                        </div>
                        <?php endwhile; ?>
                        <?php else: ?>
                        <?php endif; ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel K, 2016-03-21
@PavelK

Enter a variable, and use it to determine which post it is by account and display or not the necessary information

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question