Y'all:
I'm trying to create a page that will show just the two most recent posts within a specific category on a single page. I know I can do this with a category page, but for various reasons, I can't use a category page (not least of which is I can't figure out how to customize category pages by replacing their sidebars with a sidebar plugin). So, what I've done is to create a custom template with the following:
==
<?php
/*
Template Name: Current Classes
*/
?>
<?php
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header();
extract($bfa_ata);
global $bfa_ata_postcount;
?>
<?php get_header(); ?>
<article>
<?php
$temp = $wp_query; $wp_query= null;
$wp_query = new WP_Query(); $wp_query->query('showposts=2&cat=22' . '&paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<h2><a href="<?php the_permalink(); ?>" title="Read more"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</article>
<?php get_footer(); ?>
==
This is pretty minimal, no "older entries," and things like that, just the two posts out of the one category. The problem I'm having is that the posts are still showing up as excerpts (albeit without "more" links at the bottom), rather than full posts.
Does anyone have any idea of how to get the full post to show up? I'm using the_content() rather than the_excerpt(), so I should be getting the full content. Atahaulpa also seems to be overriding the link at the top of the post in some way, replacing the "read more" that should be coming from this code with "permanent link to..."
I've looked at index.php, and tried to start with that as a template instead of just pulling together a generic template like this, but... I can't figure the loop out in index.php. It looks like it's calling in to functions that I can't find, and I probably don't want to modify, to display the post.
Any help appreciated.
Thanks!
:-)
Russ