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


  #1  
Old Apr 6, 2013, 04:28 PM
riw777
 
33 posts · Jun 2009
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
  #2  
Old Apr 7, 2013, 06:23 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
why not use the 'multi column/custom query' that comes with the theme? use your same query, set the custom fields to:
HTML Code:
custom_query showposts=2&cat=22
number_of_columns 1
number_of_full_posts 2
show_page_text no
posts_above_the_column 2
show_page_title no
and you are done.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Apr 8, 2013, 12:48 PM
riw777
 
33 posts · Jun 2009
Oh --I hadn't thought of that... Thanks for that idea, it might solve some other issues I'm having with the formatting of these pages.

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 05:55 PM
Post Thumbnails both on excerpts and full posts? untore Excerpts, Read more, Pagination 3 Feb 4, 2013 12:28 PM
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 06:42 AM
Multiple category pages - excerpts/full posts dberg Center area post/pages 0 May 5, 2010 04:56 AM
Different styles for excerpts and full posts? daniel3ub Excerpts, Read more, Pagination 3 Oct 20, 2009 07:09 PM


All times are GMT -6. The time now is 12:32 AM.


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