Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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, 03: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, 05:23 AM
juggledad's Avatar
juggledad
 
23,682 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, 11:48 AM
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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 08:34 PM.


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