PHP Code to Display Certain Pages
-
My domain name is link and as you can see, there are three duplicate blocks displaying pages displayed in the top rows. I have pasted what I think is the responsible php block
<section id="wrapsecond" class="pagewrap2"> <div class="container"> <div class="services-wrap"> <?php for($p=1; $p<7; $p++) { $q = $p; if($p>3) $q -=3; ?> <?php if( get_theme_mod('page-column'.$q,false)) { ?> <?php $queryxxx = new WP_query('page_id='.get_theme_mod('page-column'.$q,true)); ?> <?php while( $queryxxx->have_posts() ) : $queryxxx->the_post(); ?> <div class="listpages <?php if($p % 3 == 0) { echo "last_column"; } ?>"> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail();?> <h4><?php the_title(); ?></h4></a> <?php /* <p><?php the_excerpt(); ?></p> <a href="<?php the_permalink(); ?>"><?php _e('Read More','skt-construction'); ?></a> */ ?> </div> <?php endwhile; wp_reset_query(); ?> <?php } else { ?> <div class="listpages <?php if($p % 3 == 0) { echo "last_column"; } ?>"> <a href=""><img src="<?php echo get_template_directory_uri(); ?>/images/about<?php echo $p; ?>.jpg" alt="" /> <h4><?php _e('Page Title','skt-construction'); ?> <?php echo $p; ?></h4></a> <p><?php _e('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque augue eros, posuere a condimentum sit amet, rhoncus eu libero. Maecenas in tincidunt turpis, ut rhoncus neque.','skt-construction'); ?></p> <a href="#"><?php _e('Read More','skt-construction'); ?></a> </div> <?php }} ?> </div><!-- services-wrap-->
The topic ‘PHP Code to Display Certain Pages’ is closed to new replies.