Static home page issues
-
I created a page to use as a static homepage based on a template. In it I have added code to show posts below the static content. I can see the page fine if I go to it directly
(here: https://thewillowfarm.com/wordpressTEST/home-2)
but it won’t display as the actual Home page that the “Home” link in the nav bar links to.
https://thewillowfarm.com/wordpressTEST/
Perhaps I over thought this approach, but would love to get it working.
Here’s the code for the template:
<?php /* * Template Name: home */ ?> <?php get_header(); ?> <div id="content" role="main"> <!-- PAGE --> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <?php breadcrumb_trail(); ?> <h2> <?php if (function_exists('ghpseo_output')) ghpseo_output('secondary_title'); else the_title(); ?> </h2> <div class="entry"> <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </div> </div> <?php endwhile; endif; ?> <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?> <!-- END PAGE --> <!-- POSTS --> <h1 id="whatsNew">What's New at The Willow Farm</h1> <?php $temp_query = $wp_query; ?> <?php query_posts("showposts=2"); ?> <?php while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <!-- END POSTS --> </div><!-- END Content div --> <?php get_sidebar(); ?> <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Static home page issues’ is closed to new replies.