Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 112766

SeaBerGBer on "Forward/Back buttons missing in custom template"

$
0
0

I finally figured out how to make pages that only display certain content. Now, those pages (and those pages only will not display the "Older Posts"/"Newer Posts" buttons anymore. The code is nearly identical so I don't understand why that would be.

My original page.php reads:

<?php get_header(); ?>

		<div id="main" role="main" class="<?php brunelleschi_content_class(); ?>">

			<?php get_template_part( 'loop', 'page' ); ?>

		</div><!-- #main -->
<?php if( brunelleschi_options('sidebar') === __('both','brunelleschi')
		|| brunelleschi_options('sidebar') === __('two left','brunelleschi')
		|| brunelleschi_options('sidebar') === __('two right','brunelleschi')){
			get_sidebar('secondary');
		} ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

My code for my custom page reads:

<?php /* Template Name: DIY */ ?>

<?php get_header(); ?>

		<div id="main" role="main" class="<?php brunelleschi_content_class(); ?>">

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>

<?php query_posts('category_name=DIY (Mine)');?>

			<?php get_template_part( 'loop', 'page' ); ?>

		</div><!-- #main -->
<?php if( brunelleschi_options('sidebar') === __('both','brunelleschi')
		|| brunelleschi_options('sidebar') === __('two left','brunelleschi')
		|| brunelleschi_options('sidebar') === __('two right','brunelleschi')){
			get_sidebar('secondary');
		} ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

So all I added was:
The template name to the top

The code to display page content before querying the posts.
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>

And the bit to query the specific posts
<?php query_posts('category_name=DIY (Mine)');?>

What am I missing that could be removing the page navigation buttons?

My page is http://www.acoloradocourtship.com and this template pertains to the "DIY" menu option. My theme is brunelleschi.

Thank you! <3


Viewing all articles
Browse latest Browse all 112766

Trending Articles