Broken Page Template with Thumbnails
-
So quick background on this is that I’ve taken on a challenge of fixing a site that someone else built but no longer supports. The person still wants to keep this theme/look so I’ve offered to try and fix it. I don’t have A LOT of skill in coding but enough to get by. I’ve brought the site back from a WSOD, and its nearly fully functional again, with the exception of this page.
The page is using a custom page template, but as you can see it is not functioning properly. It should have 2 rows of 3 thumbnails, with page navigation. It’s pulling these from a ‘gift shop’ category on the site. The coding for the template is below. I had to rebuild the header and footer files, so I’m not sure where my problem exists.
Any help I’d appreciate, as I’m sitting at a loss. I’m working with a custom Twenty Eleven theme.<?php /** * Template Name: Gift Shop * Description: A Page Template that showcases Sticky Posts, Asides, and Blog Posts * * The showcase template in Twenty Eleven consists of a featured posts section using sticky posts, * another recent posts area (with the latest post shown in full and the rest as a list) * and a left sidebar holding aside posts. * * We are creating two queries to fetch the proper posts and a custom widget for the sidebar. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ // Enqueue showcase script for the slider get_header(); ?> <div id="primary"> <div id="content" role="main"> <div class="content"> <div id="post-<?php echo $post->ID; ?>" class="welcome_ post"> <?php if ( have_posts() ) : ?> <?php #twentyeleven_content_nav( 'nav-above' ); ?> <?php while ( have_posts() ) : the_post(); ?> <h2><!--<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"></a>--><?php the_title();?></h2> <?php echo the_content();?> <?php endwhile; ?> <?php endif;wp_reset_query(); ?> <div class="gallery_gift"> <?php query_posts("cat=5&showposts=6".'&paged='.$paged); ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <div> <div class="gift-thumb"> <a id="example7" href="<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID) );?>" title="<?php echo get_post_meta($post->ID, 'description', true); ?>"> <?php the_post_thumbnail(array(187,187)) ?> </a> </div><div class="tilte_giftimg"> <?php the_title(); ?> </div></div> <?php endwhile;?> <?php wp_pagenavi(); ?> <?php #echo wp_paging('show_all=true&page_bkg=dark'); ?> <?php endif;?> <?php wp_reset_query();?> <script type="text/javascript"> $(document).ready(function() { $("a#example7").fancybox({ 'titlePosition' : 'inside' }); }); </script> </div> </div></div> </div><!-- #content --> </div> <!-- #primary --><div style="margin-top:200px;"></div> <?php get_footer(); ?>
The topic ‘Broken Page Template with Thumbnails’ is closed to new replies.