Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Excerpts, Read more, Pagination »

Question on Excerpts vs Full Posts on a Custom Template Page


 
Prev Previous Post   Next Post Next
  #1  
Old Apr 6, 2013, 03:28 PM
riw777
 
33 posts · Jun 2009
Question on Excerpts vs Full Posts on a Custom Template Page

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
 

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Excerpts showing full posts for some posts fsmart Excerpts, Read more, Pagination 2 Mar 3, 2013 04:55 PM
Post Thumbnails both on excerpts and full posts? untore Excerpts, Read more, Pagination 3 Feb 4, 2013 11:28 AM
BUGFIX 351/352-01: EXCERPTS - Show first X posts on HOME page as full posts juggledad Old Version fixes and change logs 1 Jul 13, 2010 05:42 AM
Multiple category pages - excerpts/full posts dberg Center area post/pages 0 May 5, 2010 03:56 AM
Different styles for excerpts and full posts? daniel3ub Excerpts, Read more, Pagination 3 Oct 20, 2009 06:09 PM


All times are GMT -6. The time now is 01:53 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.