php - Wordpress blog post looping on different class -
i need since i'm beginner in php , wordpress (ain't got people around ask), how make php wordpress blog post loop in different class 1 latest post image..
here's html code:
<!-- div wrapped large post --> <div class="blog"> <a href="#"> <div class="row"> <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12"> <img src="img/blog-super.jpg" class="img-responsive" /> </div> <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12"> <div class="img-content text-left culturo-imagery"> <h2>the thing marketers have fear fear of change</h2> <div class="article-super"> gladly, customer-service software company, offering organizations opportunity connect customers on variety of platforms. gladly, customer-service software company, offering organizations opportunity connect customers on variety of platforms.variety of platforms.variety of platforms. </div> <div class="date">june, 20 2016</div> </div> </div> </div> </a> </div> <!-- div wrapped large post (end) --> <!-- div wrapped small posts --> <div class="blog-sm"> <div class="row"> <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12"> <a href=""> <div class="img-content text-left culturo-imagery"> <img src="img/blog1.jpg" class="img-responsive" /> <h4>we understand unique pressures business owners face.</h4> <div class="article"> gladly, customer-service software company, offering organizations opportunity connect customers on variety of platforms. </div> <div class="date">june, 20 2016</div> </div> </a> </div> <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12"> <a href="#"> <div class="img-content text-left culturo-imagery"> <img src="img/blog2.jpg" class="img-responsive" /> <h4>on complete understanding, our team delivers.</h4> <div class="article"> chris grabarkiewicz of luxottica retail discusses how overcome challenge of synthesizing traditional marketing research information big data generate insights. </div> <div class="date">june, 20 2016</div> </div> </a> </div> <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12"> <a href="#"> <div class="img-content text-left culturo-imagery"> <img src="img/blog3.jpg" class="img-responsive" /> <h4>and can assist in implementing right solutions.</h4> <div class="article"> successful marketing defined differently in different contexts. understand effect, researchers must consider factors influence consumer choice, not marketing effort </div> <div class="date">june, 20 2016</div> </div> </a> </div> </div> </div> <!-- div wrapped small posts (end) -->
really appreciate help, in advance :)
-avril-
to catch first post can 1 loop conditional statement example:
<?php if( $wp_query->current_post == 0 && !is_paged() ) : ?> /*the output of first post*? <?php else : ?> /*the output of other posts*/ <?php endif; ?>
in case
<?php if( $wp_query->current_post == 0 && !is_paged() ) : ?> <!-- div wrapped large post --> <div class="blog"> <a href="#"> <div class="row"> <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12"> <img src="img/blog-super.jpg" class="img-responsive" /> </div> <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12"> <div class="img-content text-left culturo-imagery"> <h2>the thing marketers have fear fear of change</h2> <div class="article-super"> gladly, customer-service software company, offering organizations opportunity connect customers on variety of platforms. gladly, customer-service software company, offering organizations opportunity connect customers on variety of platforms.variety of platforms.variety of platforms. </div> <div class="date">june, 20 2016</div> </div> </div> </div> </a> </div> <div class="blog-sm"> <div class="row"> <!-- div wrapped large post (end) --> <?php else : ?> <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12"> <a href=""> <div class="img-content text-left culturo-imagery"> <img src="img/blog1.jpg" class="img-responsive" /> <h4>we understand unique pressures business owners face.</h4> <div class="article"> gladly, customer-service software company, offering organizations opportunity connect customers on variety of platforms. </div> <div class="date">june, 20 2016</div> </div> </a> </div> <?php endif; ?> </div> </div>
i recommend read article : different style first post
Comments
Post a Comment