Forum Replies Created

Viewing 6 replies - 31 through 36 (of 36 total)
  • Thread Starter michaelhyatt

    (@michaelhyatt)

    Anyone?

    Thread Starter michaelhyatt

    (@michaelhyatt)

    I already had the navigation calls outside the loop.

    As it turns out, I have taken another approach and solved the problem.

    Thanks.

    Thread Starter michaelhyatt

    (@michaelhyatt)

    This still doesn’t show the navigation controls. The code now looks like this:

    <?php
    /*
    Template Name: Resources
    */
    ?>
    
    <?php get_header(); ?>
    
    <?php
    	$show_posts = '10';
    	$cat_name = 'Resources';
    	$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    
    	$my_query = new WP_query('category_name=' . $cat_name . '&showposts=' . $show_posts . '&paged=' . $paged);
    
    	global $wp_query;
      	$wp_query->in_the_loop = true;
    
      	while ($my_query->have_posts()) : $my_query->the_post();
      	$do_not_duplicate = $post->ID;?>
    
    	<!--Start Post-->
    	<div class="post">
    
    		<div class="p-head">
     			<p class="p-date"><?php the_time('l, F j, Y') ?></p>
    			<h1><?php the_title(); ?></h1>
    		</div>
    
    		<div class="p-con">
    			<?php the_content(); ?>
    		</div>
    
    		<?php the_tags('Resource: &nbsp',', '); ?>
    
    	</div>
    
    <?php endwhile; ?>
    
    <!-- Insert Navigation -->
     <<?php include("nav.php"); ?>
    
    <?php get_footer(); ?>
    Thread Starter michaelhyatt

    (@michaelhyatt)

    This is a big help. However, the pagination is still not showing up. I want 10 entries to show up per page. Here’s what I have now. Sorry to be so dense.

    <?php
    /*
    Template Name: Resources
    */
    ?>
    
    <?php get_header(); ?>
    
    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $my_query = new WP_Query('category_name=Resources&showposts=5&paged=' . '$paged');
    
    global $my_query;
      $my_query->in_the_loop = true; 
    
      global $wp_query;
      $wp_query->in_the_loop = true;
    
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate = $post->ID;?>
    
    	<!--Start Post-->
    	<div class="post">
    
    		<div class="p-head">
     			<p class="p-date"><?php the_time('l, F j, Y') ?></p>
    			<h1><?php the_title(); ?></h1>
    		</div>
    
    		<div class="p-con">
    			<?php the_content(); ?>
    		</div>
    
    		<?php the_tags('Resource: &nbsp',', '); ?>
    
    	</div>
    
    <?php endwhile; ?>
    
    <!--Start Post-->
    <?php include("nav.php"); ?>
    
    <?php get_footer(); ?>

    Here’s the output this code produces.

    I think I’m going to stick with 9.1 for a while. I didn’t try the suggested fix. I just don’t have the time to play with this right now. 9.1 seems to be working fine. Thanks.

    Same thing happened to me. My site is down. If I reboot the server, it stays up for about ten minutes and then goes down again. The only thing I have done is the last 48 hours is the update.

Viewing 6 replies - 31 through 36 (of 36 total)