Forum Replies Created

Viewing 2 replies - 151 through 152 (of 152 total)
  • Thread Starter jrodgers

    (@jrodgers)

    ok, i looked through thaose pages and i then took teh page.php template added some code to it and saved it as events.php, code is a s follows, is this the proper way to achieve what i am trying to do?

    thanks again.

    <?php
    /*
    Template Name: Events
    */
    ?>
    
    <?php get_header(); ?>
    
    	<div id="content" class="narrowcolumn">
    	<?php
     		$query= 'cat=events'; // concatenate the query
     		query_posts($query); // run the query
     	?>
    
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div class="pagepost">
    		<h2 id="post-<?php the_ID(); ?>"><?php the_title(); ?></h2>
    			<div class="entrytext">
    				<?php the_content('<p class="serif">Read more &raquo;</p>'); ?>
    
    				<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    
    			</div>
    		</div>
    	  <?php endwhile; endif; ?>
    	<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    if you go into the admin under options>reading in the front page options select static front page, just below that is an option to specify which page is the home page (front page), the static page you want and another option which will allow you to set your ‘blog’ page (posts page), this is in 2.3 not sure about other versions

Viewing 2 replies - 151 through 152 (of 152 total)