Homepage.php Navigation help for (working) thumbnail listing
-
I’ve repurposed my homepage.php to display a grid of images, each linking to their relevant post. I’ve then used homepage.php as a “Page” template, to give it a fixed URL. It looks great for my needs, also serving as a hacky archive, however page navigation no longer works.
I’d like to find a simple next/previous page OR page numbering solution. Any help would be much appreciated, (and no plugins please).
Here’s my code (minus any navigation). Thank you!!
<?php
//Template Name: Home
get_header()
?>
<div class=”container”>
<header>
<!–<h1><?php echo get_option(‘tiny_head_title’) ?></h1> –>
<!–<p><?php echo get_option(‘tiny_head_description’) ?></p>–>
</header><?php $paged = get_query_var(‘page’);??>
<?php $home = new WP_Query(array(‘post_type’=> ‘post’, ‘posts_per_page’ =>8, ‘paged’ => $paged)); ?>
<?php if($home->have_posts()): ?>
<div class=”posts”>
<?php while($home->have_posts()) : $home->the_post(); ?>
<div class=”archivemother”><div class=”archivethumb”><?php agentwp_print_post_title(); ?></div></div>
<!– <?php the_excerpt() ?> –><?php endwhile; ?>
</div>
<?php endif; ?>
</div>
<?php get_footer()?>
- The topic ‘Homepage.php Navigation help for (working) thumbnail listing’ is closed to new replies.