Loop Inside Page Template Question
-
I have a custom page template for my front page where I’m displaying posts in a grid. My posts are motorhomes.
If you click my url you’ll see a grid of motorhomes.
The loop for the motorhome posts works great except one feature. You’ll see red font that says “Get more information” and, when clicked, opens a lightbox.
This lightbox shows the post’s excerpt. The only problem is that it keeps showing the excerpt from the first post. What am I missing?
I’m using the Lightbox Plus Colorbox plugin. Here’s my page template code:
The portion of the code calling the lightbox function is here:
<h5 style="display:inline;"><a class="lbp-inline-link-1 cboxElement" href="#" style="color:red;">Get More Information</a></h5> <div style="display: none;"> <div id="lbp-inline-href-1" style="padding:10px; background: #fff;"> <p><?php the_excerpt(); ?></p> </div></div>
Here’s my URL: https://www.eugdeals.com/premier_rv_storage/
If you wish to see my entire template code, you can find that here:
<?php /** * The main template file. * * This is the most generic template file in a WordPress theme * and one of the two required files for a theme (the other being style.css). * It is used to display a page when nothing more specific matches a query. * E.g., it puts together the home page when no home.php file exists. * Learn more: https://codex.www.ads-software.com/Template_Hierarchy * */ ?> <?php get_header(); ?> <!-- ------------- --> <!-- SLIDER Starts --> <!-- ------------- --> <div class="slider-wrapper"> <div id="slider" class="nivoSlider"> <?php if (woodpecker_get_option('woodpecker_slideimage1') != '') { ?> <img src="<?php echo woodpecker_get_option('woodpecker_slideimage1'); ?>" data-thumb="<?php echo woodpecker_get_option('inkthemes_slideimage1'); ?>" alt="" title="#htmlcap-slider1" /> <?php } else { ?> <img src="<?php bloginfo('template_url'); ?>/images/slide1.jpg" data-thumb="<?php bloginfo('template_url'); ?>/images/slide1.jpg" alt="" title="#htmlcap-slider1" /> <?php } ?> <?php if (woodpecker_get_option('woodpecker_slideimage2') != '') { ?> <img src="<?php echo woodpecker_get_option('woodpecker_slideimage2'); ?>" data-thumb="<?php echo woodpecker_get_option('inkthemes_slideimage2'); ?>" alt="" title="#htmlcap-slider2" /> <?php } else { } ?> <?php if (woodpecker_get_option('woodpecker_slideimage3') != '') { ?> <img src="<?php echo woodpecker_get_option('woodpecker_slideimage3'); ?>" data-thumb="<?php echo woodpecker_get_option('inkthemes_slideimage3'); ?>" alt="" title="#htmlcap-slider3" /> <?php } else { } ?> <?php if (woodpecker_get_option('woodpecker_slideimage4') != '') { ?> <img src="<?php echo woodpecker_get_option('woodpecker_slideimage4'); ?>" data-thumb="<?php echo woodpecker_get_option('inkthemes_slideimage4'); ?>" alt="" title="#htmlcap-slider4" /> <?php } else { } ?> <?php if (woodpecker_get_option('woodpecker_slideimage5') != '') { ?> <img src="<?php echo woodpecker_get_option('woodpecker_slideimage5'); ?>" data-thumb="<?php echo woodpecker_get_option('inkthemes_slideimage5'); ?>" alt="" title="#htmlcap-slider5" /> <?php } else { } ?> </div> <div class="hidden"> <!-- caption1 --> <div id="htmlcap-slider1"> <div class="slider-caption-container"> <?php if (woodpecker_get_option('woodpecker_sliderheading1') != '') { ?> <h1 class="slide-h1"><?php echo woodpecker_get_option('woodpecker_sliderheading1'); ?></h1> <?php } else { ?> <h1 class="slide-h1">WordPress theme with Bootstrap</h1> <?php } ?> <?php if (woodpecker_get_option('woodpecker_sliderdes1') != '') { ?> <p class="slide-para"><?php echo woodpecker_get_option('woodpecker_sliderdes1'); ?></p> <?php } else { ?> <p class="slide-para">Woodpecker is completely integrated with Bootstrap 3.0</p> <?php } ?> <?php if (woodpecker_get_option('woodpecker_Slider_butotntext1') != '') { ?> <a class="slide-button" href="<?php echo woodpecker_get_option('woodpecker_Slider_buttonlink1'); ?>"><?php echo woodpecker_get_option('woodpecker_Slider_butotntext1'); ?></a> <?php } else { ?> <a class="slide-button" href="#">Start Building Your Website Now!</a> <?php } ?> </div> </div> <!-- caption1 ends--> <!-- caption2 --> <div id="htmlcap-slider2"> <div class="slider-caption-container"> <?php if (woodpecker_get_option('woodpecker_sliderheading2') != '') { ?> <h1 class="slide-h1"><?php echo woodpecker_get_option('woodpecker_sliderheading2'); ?></h1> <?php } else { } ?> <?php if (woodpecker_get_option('woodpecker_sliderdes2') != '') { ?> <p class="slide-para"><?php echo woodpecker_get_option('woodpecker_sliderdes2'); ?></p> <?php } else { } ?> <?php if (woodpecker_get_option('woodpecker_Slider_butotntext2') != '') { ?> <a class="slide-button" href="<?php echo woodpecker_get_option('woodpecker_Slider_buttonlink2'); ?>"><?php echo woodpecker_get_option('woodpecker_Slider_butotntext2'); ?></a> <?php } else { } ?> </div> </div> <!-- caption2 ends--> <!-- caption3 --> <div id="htmlcap-slider3"> <div class="slider-caption-container"> <?php if (woodpecker_get_option('woodpecker_sliderheading3') != '') { ?> <h1 class="slide-h1"><?php echo woodpecker_get_option('woodpecker_sliderheading3'); ?></h1> <?php } else { } ?> <?php if (woodpecker_get_option('woodpecker_sliderdes3') != '') { ?> <p class="slide-para"><?php echo woodpecker_get_option('woodpecker_sliderdes3'); ?></p> <?php } else { } ?> <?php if (woodpecker_get_option('woodpecker_Slider_butotntext3') != '') { ?> <a class="slide-button" href="<?php echo woodpecker_get_option('woodpecker_Slider_buttonlink3'); ?>"><?php echo woodpecker_get_option('woodpecker_Slider_butotntext3'); ?></a> <?php } else { } ?> </div> </div> <!-- caption3 ends--> <!-- caption4 --> <div id="htmlcap-slider4"> <div class="slider-caption-container"> <?php if (woodpecker_get_option('woodpecker_sliderheading4') != '') { ?> <h1 class="slide-h1"><?php echo woodpecker_get_option('woodpecker_sliderheading4'); ?></h1> <?php } else { } ?> <?php if (woodpecker_get_option('woodpecker_sliderdes4') != '') { ?> <p class="slide-para"><?php echo woodpecker_get_option('woodpecker_sliderdes4'); ?></p> <?php } else { } ?> <?php if (woodpecker_get_option('woodpecker_Slider_butotntext4') != '') { ?> <a class="slide-button" href="<?php echo woodpecker_get_option('woodpecker_Slider_buttonlink4'); ?>"><?php echo woodpecker_get_option('woodpecker_Slider_butotntext4'); ?></a> <?php } else { } ?> </div> </div> <!-- caption4 ends--> <!-- caption5 --> <div id="htmlcap-slider5"> <div class="slider-caption-container"> <?php if (woodpecker_get_option('woodpecker_sliderheading5') != '') { ?> <h1 class="slide-h1"><?php echo woodpecker_get_option('woodpecker_sliderheading5'); ?></h1> <?php } else { } ?> <?php if (woodpecker_get_option('woodpecker_sliderdes5') != '') { ?> <p class="slide-para"><?php echo woodpecker_get_option('woodpecker_sliderdes5'); ?></p> <?php } else { } ?> <?php if (woodpecker_get_option('woodpecker_Slider_butotntext5') != '') { ?> <a class="slide-button" href="<?php echo woodpecker_get_option('woodpecker_Slider_buttonlink5'); ?>"><?php echo woodpecker_get_option('woodpecker_Slider_butotntext5'); ?></a> <?php } else { } ?> </div> </div> <!-- caption5 ends--> </div> </div> <!-- Slide show speed starts here --> <input type="hidden" id="txt_name" value="<?php if (woodpecker_get_option('woodpecker_slider_speed') != '') { ?><?php echo stripslashes(woodpecker_get_option('woodpecker_slider_speed')); ?><?php } else { ?>3000<?php } ?>"/> <!-- ----------- --> <!-- SLIDER Ends --> <!-- ----------- --> <!-- -------------- --> <!-- CONTENT Starts --> <!-- -------------- --> <div class="content-wrapper"> <div class="container"> <div class="row"> <div class="content-container"> <!-- Feature page with thumbnail 3column starts --> <div class="feature-page-wt-thumb clear"> <div class="row"> <!-- 3column feature block 1 --> <div class="col-lg-8 col-md-8 col-sm-8"> <div class="feature-page-wt-thumb-container gallery"> <?php if (woodpecker_get_option('woodpecker_threecolumn_fet_title1') != '') { ?> <h1><a <?php if (woodpecker_get_option('woodpecker_services_title_link1') != '') { ?>href="<?php echo woodpecker_get_option('woodpecker_services_title_link1'); ?>" <?php } else { } ?>><?php echo woodpecker_get_option('woodpecker_threecolumn_fet_title1'); ?></a></h1><?php } else { ?> <h1>Our Products</h1> <?php } ?> <?php if (woodpecker_get_option('woodpecker_threecolumn_fet_image1') != '') { ?> <a href="<?php echo woodpecker_get_option('woodpecker_services_title_link1'); ?>" rel="prettyPhoto[gallery1]"> <img src="<?php echo woodpecker_get_option('woodpecker_threecolumn_fet_image1'); ?>"> </a> <?php } else { ?> <a href="<?php bloginfo('template_url'); ?>/images/fp-thumb1.jpg" rel="prettyPhoto[gallery1]"><img src="<?php bloginfo('template_url'); ?>/images/fp-thumb1.jpg"></a> <?php } ?> <?php if (woodpecker_get_option('woodpecker_threecolumn_fet_desc1') != '') { ?> <p><?php echo woodpecker_get_option('woodpecker_threecolumn_fet_desc1'); ?> <?php if (woodpecker_get_option('woodpecker_services_title_link1') != '') { ?> <a href="<?php echo woodpecker_get_option('woodpecker_services_title_link1'); ?>" class="wpanch">Read More...</a><?php } else { } ?> </p> <?php } else { ?> <p>Showcase your best quality products on home page to grab visitor's attention. <a href="#readmore" class="wpanch">Read More ...</a></p> <?php } ?> </div> </div> <!-- 3column feature block 1 ends --> <!-- 3column feature block 2 --> <div class="col-lg-8 col-md-8 col-sm-8"> <div class="feature-page-wt-thumb-container gallery"> <?php if (woodpecker_get_option('woodpecker_threecolumn_fet_title2') != '') { ?> <h1><a <?php if (woodpecker_get_option('woodpecker_services_title_link2') != '') { ?>href="<?php echo woodpecker_get_option('woodpecker_services_title_link2'); ?>" <?php } else { } ?>><?php echo woodpecker_get_option('woodpecker_threecolumn_fet_title2'); ?></a></h1><?php } else { ?> <h1>Our Services</h1> <?php } ?> <?php if (woodpecker_get_option('woodpecker_threecolumn_fet_image2') != '') { ?> <a href="<?php echo woodpecker_get_option('woodpecker_services_title_link2'); ?>" rel="prettyPhoto[gallery1]"><img src="<?php echo woodpecker_get_option('woodpecker_threecolumn_fet_image2'); ?>"></a> <?php } else { ?> <a href="<?php bloginfo('template_url'); ?>/images/fp-thumb2.jpg" rel="prettyPhoto[gallery1]"><img src="<?php bloginfo('template_url'); ?>/images/fp-thumb2.jpg"></a> <?php } ?> <?php if (woodpecker_get_option('woodpecker_threecolumn_fet_desc2') != '') { ?> <p><?php echo woodpecker_get_option('woodpecker_threecolumn_fet_desc2'); ?> <?php if (woodpecker_get_option('woodpecker_services_title_link2') != '') { ?> <a href="<?php echo woodpecker_get_option('woodpecker_services_title_link2'); ?>" class="wpanch">Read More...</a><?php } else { } ?> </p> <?php } else { ?> <p>Show your multiple services that will explore your website among the audience. <a href="#readmore" class="wpanch">Read More ...</a></p> <?php } ?> </div> </div> <!-- 3column feature block 2 ends --> <!-- 3column feature block 3 --> <div class="col-lg-8 col-md-8 col-sm-8"> <div class="feature-page-wt-thumb-container gallery"> <?php if (woodpecker_get_option('woodpecker_threecolumn_fet_title3') != '') { ?> <h1><a <?php if (woodpecker_get_option('woodpecker_services_title_link3') != '') { ?>href="<?php echo woodpecker_get_option('woodpecker_services_title_link1'); ?>" <?php } else { } ?>><?php echo woodpecker_get_option('woodpecker_threecolumn_fet_title3'); ?></a></h1><?php } else { ?> <h1>Our Clients</h1> <?php } ?> <?php if (woodpecker_get_option('woodpecker_threecolumn_fet_image3') != '') { ?> <a href="<?php echo woodpecker_get_option('woodpecker_services_title_link3'); ?>" rel="prettyPhoto[gallery1]"><img src="<?php echo woodpecker_get_option('woodpecker_threecolumn_fet_image3'); ?>"></a> <?php } else { ?> <a href="<?php bloginfo('template_url'); ?>/images/fp-thumb3.jpg" rel="prettyPhoto[gallery1]" ><img src="<?php bloginfo('template_url'); ?>/images/fp-thumb3.jpg"></a> <?php } ?> <?php if (woodpecker_get_option('woodpecker_threecolumn_fet_desc3') != '') { ?> <p><?php echo woodpecker_get_option('woodpecker_threecolumn_fet_desc3'); ?> <?php if (woodpecker_get_option('woodpecker_services_title_link3') != '') { ?> <a href="<?php echo woodpecker_get_option('woodpecker_services_title_link3'); ?>" class="wpanch">Read More...</a><?php } else { } ?> </p> <?php } else { ?> <p>Show testimonials of your clients that will build the trust among the audience. <a href="#readmore" class="wpanch">Read More ...</a></p> <?php } ?> </div> </div> <!-- 3column feature block 3 ends --> </div> </div> <!-- Feature page with thumbnail 3 column Ends --> <!-- -------------------------- --> <!-- -FEATURED TAGLINES Starts- --> <div class="featured-tagline-wrapper clear"> <div class="row"> <div class="feature-tagline-container"> <?php if (woodpecker_get_option('woodpecker_punchline_heading') != '') { ?> <h1><?php echo woodpecker_get_option('woodpecker_punchline_heading'); ?></h1> <?php } else { ?> <h1>Build Your Clean & Optimized Website Within Few Clicks</h1> <?php } ?> <?php if (woodpecker_get_option('woodpecker_page_tagline_desc') != '') { ?> <p><?php echo woodpecker_get_option('woodpecker_page_tagline_desc'); ?></p> <?php } else { ?> <p>Creating your website with Woodpecker is completely easy. You just need to perform few tweaks in the theme option panel and your website will be ready to use. You can showcase all important aspects of your business here on home page.</p> <?php } ?> </div> </div> </div> <!-- -FEATURED TAGLINES Ends- --> <!-- -FEATURED Video-Img Holder Starts- --> <div class="vidimg-wrapper"> <div class="row"> <!-- Video-Img Holder 1 Starts- --> <?php if (woodpecker_get_option('woodpecker_video_box1') == '' && woodpecker_get_option('woodpecker_image_box1') == '') { ?> <div style="display:none;" class="col-lg-12 col-md-12 col-sm-12"> <?php } elseif ((woodpecker_get_option('woodpecker_video_box2') !== '') || (woodpecker_get_option('woodpecker_image_box2') !== '')) { ?> <div class="col-lg-12 col-md-12 col-sm-12"> <?php } else { ?> <div class="col-lg-24 col-md-24 col-sm-24"> <?php } ?> <!-- conditional statement ends --> <div class="vidimg-container"> <div class="vid-holder1 gallery"> <?php if (woodpecker_get_option('woodpecker_video_box1') != '') { ?> <?php echo woodpecker_get_option('woodpecker_video_box1'); ?> <?php } else { ?> <?php if (woodpecker_get_option('woodpecker_image_box1') != '') { ?> <?php if (woodpecker_get_option('woodpecker_video_link_over_image1') != '') { ?> <a href="<?php echo woodpecker_get_option('woodpecker_video_link_over_image1'); ?>" rel="prettyPhoto[video]"> <?php } else { ?> <a href="<?php echo woodpecker_get_option('woodpecker_image_box1'); ?>" rel="prettyPhoto[video]"> <?php } ?> <img src="<?php echo woodpecker_get_option('woodpecker_image_box1'); ?>"> <?php if (woodpecker_get_option('woodpecker_video_link_over_image1') != '') { ?> <img src="<?php bloginfo('template_url'); ?>/images/play-button.png" class="zoom-btn"> <?php } else { ?> <img src="<?php bloginfo('template_url'); ?>/images/zoom.png" class="zoom-btn"> <?php } ?> </a> <?php } else { } } ?> </div> <?php if (woodpecker_get_option('woodpecker_caption_text1') != '') { ?> <div class="vid-hld-anchor"> <a <?php if (woodpecker_get_option('woodpecker_caption_link1') != '') { ?> href="<?php echo woodpecker_get_option('woodpecker_caption_link1'); ?>" <?php } else { } ?> class="wpanch" target="_blank"><?php echo woodpecker_get_option('woodpecker_caption_text1'); ?></a> </div> <?php } else { } ?> </div> </div> <!-- Video-Img Holder 1 Ends- --> <!-- Video-Img Holder 2 Starts- --> <?php if (woodpecker_get_option('woodpecker_video_box2') == '' && woodpecker_get_option('woodpecker_image_box2') == '') { ?> <div style="display:none;" class="col-lg-12 col-md-12 col-sm-12"> <?php } elseif ((woodpecker_get_option('woodpecker_video_box1') !== '') || (woodpecker_get_option('woodpecker_image_box1') !== '')) { ?> <div class="col-lg-12 col-md-12 col-sm-12"> <?php } else { ?> <div class="col-lg-24 col-md-24 col-sm-24"> <?php } ?> <!-- conditional statement ends --> <div class="vidimg-container"> <div class="vid-holder2 gallery"> <?php if (woodpecker_get_option('woodpecker_video_box2') != '') { ?> <?php echo woodpecker_get_option('woodpecker_video_box2'); ?> <?php } else { ?> <?php if (woodpecker_get_option('woodpecker_image_box2') != '') { ?> <?php if (woodpecker_get_option('woodpecker_video_link_over_image2') != '') { ?> <a href="<?php echo woodpecker_get_option('woodpecker_video_link_over_image2'); ?>" rel="prettyPhoto[video]"> <?php } else { ?> <a href="<?php echo woodpecker_get_option('woodpecker_image_box2'); ?>" rel="prettyPhoto[video]"> <?php } ?> <img src="<?php echo woodpecker_get_option('woodpecker_image_box2'); ?>"> <?php if (woodpecker_get_option('woodpecker_video_link_over_image2') != '') { ?> <img src="<?php bloginfo('template_url'); ?>/images/play-button.png" class="zoom-btn"> <?php } else { ?> <img src="<?php bloginfo('template_url'); ?>/images/zoom.png" class="zoom-btn"> <?php } ?> </a> <?php } else { } } ?> </div> <?php if (woodpecker_get_option('woodpecker_caption_text2') != '') { ?> <div class="vid-hld-anchor"> <a <?php if (woodpecker_get_option('woodpecker_caption_link2') != '') { ?> href="<?php echo woodpecker_get_option('woodpecker_caption_link2'); ?>" <?php } else { } ?> class="wpanch" target="_blank"><?php echo woodpecker_get_option('woodpecker_caption_text2'); ?></a> </div> <?php } else { } ?> </div> </div> <!-- Video-Img Holder 2 Ends- --> </div> </div> <!-- -FEATURED Video-Img Holder Default Text --> <?php if (woodpecker_get_option('woodpecker_video_box1') == '' && woodpecker_get_option('woodpecker_image_box1') == '' && woodpecker_get_option('woodpecker_video_box2') == '' && woodpecker_get_option('woodpecker_image_box2') == '') { ?> <div class="col-lg-12 col-md-12 col-sm-12"> <div class="vidimg-container"> <div class="vid-holder1 gallery"> <a href="https://www.youtube.com/watch?v=st8X-msK8Ck"rel="prettyPhoto[video]"> <img src="<?php bloginfo('template_url'); ?>/images/vid2.png"> <img src="<?php bloginfo('template_url'); ?>/images/play-button.png" class="zoom-btn"> </a> </div> <div class="vid-hld-anchor"> <a href="https://inkthemes.com" class="wpanch" target="_blank">Embed your video or upload an image.</a> </div> </div> </div> <div class="col-lg-12 col-md-12 col-sm-12"> <div class="vidimg-container"> <div class="vid-holder2 gallery"> <a href="https://www.youtube.com/watch?v=st8X-msK8Ck"rel="prettyPhoto[video]"> <img src="<?php bloginfo('template_url'); ?>/images/vid2.png"> <img src="<?php bloginfo('template_url'); ?>/images/play-button.png" class="zoom-btn"> </a> </div> <div class="vid-hld-anchor"> <a href="https://inkthemes.com" class="wpanch" target="_blank">Embed your video or upload an image.</a> </div> </div> </div> <?php } else { } ?> <div class="clear"></div> <!-- -FEATURED Video-Img Holder Ends- --> <!-- -BOTTOM FEATURE Textbox- --> <div class="bottom-feature-textbox"> <div class="row"> <div class="bottom-feature-container"> <div class="col-lg-18 col-md-18 col-sm-18"> <?php if (woodpecker_get_option('woodpecker_bottom_featured_desc') != '') { ?> <p><?php echo woodpecker_get_option('woodpecker_bottom_featured_desc'); ?></p> <?php } else { ?> <p>We have some really amazing products that you would be amazed to see.</p> <?php } ?> </div> <div class="col-lg-6 col-md-6 col-sm-6"> <div class="bottom-feature-button"> <?php if (woodpecker_get_option('woodpecker_bottom_feat_button_text') != '') { ?> <a href="<?php echo woodpecker_get_option('woodpecker_bottom_feat_button_link'); ?>" class="button-def" target="_blank"><?php echo woodpecker_get_option('woodpecker_bottom_feat_button_text'); ?></a> <?php } else { ?> <a href="#" class="button-def" target="_blank">View Portfolio</a> <?php } ?> </div> </div> </div> </div> </div> <!-- -BOTTOM FEATURE Textbox- --> <div style="width:100%;margin: 0px auto;" class="clear"> <div class="row"> <!----------------------Post 1--------------------------> <div style="margin:0 auto;width:98%;float:left;margin:2%;"> <h2 style="color:#44A5EF !important;font-size:46px;text-shadow: 0px 4px 3px rgba(0,0,0,0.4),0px 8px 13px rgba(0,0,0,0.1),0px 18px 23px rgba(0,0,0,0.1);margin-bottom: 25px;line-height:40px;">Available Motorhome Inventory</h2> <?php $limit = get_option('posts_per_page'); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query->query('showposts=' . $limit . '&paged=' . $paged); $wp_query->is_archive = true; $wp_query->is_home = false; ?> <!-- Start the Loop. --> <?php query_posts('cat=244'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div id="post-<?php the_ID(); ?>" style="float: left;margin-right: 1.5%; width: 31.8%;height:450px;overflow:hidden;"> <div class="post-heading"> <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1> </div> <div class="thumb clear"> <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) { ?> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?> </a> <?php } else { echo woodpecker_main_image(); } ?> </div> <div class="post-content clear"> <?php the_excerpt(); ?> <p>For more information call blah blah blah</p> <a href="<?php the_permalink() ?>" class="wpanch"><?php _e('See More Details...', 'woodpecker'); ?></a> <h5 style="display:inline;"><a class="lbp-inline-link-1 cboxElement" href="#" style="color:red;">Get More Information</a></h5> <div style="display: none;"> <div id="lbp-inline-href-1" style="padding:10px; background: #fff;"> <p><?php the_excerpt(); ?></p> </div></div> </div> </div> <?php endwhile; else: ?> <div> <p> <?php _e('Sorry no post matched your criteria', 'woodpecker'); ?> </p> </div> <?php endif; ?> <!--End Loop--> <!----------------------Post 2--------------------------> <nav id="nav-single"> <span class="nav-previous"> <?php next_posts_link(__('← Older posts', 'woodpecker')); ?> </span> <span class="nav-next"> <?php previous_posts_link(__('Newer posts →', 'woodpecker')); ?> </span> </nav> <!-- ------------------Post loop ends----------------------- --> </div> </div> <!-- -----------------------Blog template ------------------------- --> </div> </div> </div> </div> </div> <!-- -------------- --> <!-- -CONTENT Ends- --> <!-- -------------- --> <!-- --------------- --> <!-- -FOOTER Starts- --> <!-- --------------- --> <?php get_footer(); ?>
- The topic ‘Loop Inside Page Template Question’ is closed to new replies.