Custom Page Template Problem
-
Back in 2.3.3 I was running the same custom page templates I am running now. I made a php code that overrode the page itself, and simply displays the latest posts of a single category. Now, instead of doing this, it just displays the actual page and changes nothing… What am I doing wrong?
Code relevant to my problem:
<?php
get_header();
query_posts(‘posts_per_page=3&category_name=news’);
?><?php get_header();?>
<?php get_sidebar(); ?><?php if (have_posts()) : ?>
<div class=”body”>
<?php while (have_posts()) : the_post(); ?>
<h2 style=”clear:left;” id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
<div style=”float: left;”><small><?php the_time(‘M d Y’); ?></small></div><div class=”entry”>
<?php the_content(‘Read the rest of this entry »’); ?>
<small><?php edit_post_link(‘Edit’); ?></small>
</div>
<?php endwhile; ?>
<?php else : ?>
<h2 class=”center”>Oops – Not Found</h2>
<p class=”center”><?php _e(“Sorry, whatever you’re searching for isn’t on this site. Try varying your search terms in the search function above.”); ?></p>
<?php endif; ?>
- The topic ‘Custom Page Template Problem’ is closed to new replies.