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 »

how to? Given category always show the complete post instead of the excerpt?


  #1  
Old Mar 29, 2011, 05:13 PM
daniel3ub
 
26 posts · Jul 2009
how to? Given category always show the complete post instead of the excerpt?

Hi, guys!

Is there a way to make the posts from a given category always show the complete post instead of the excerpt, while all others categories showing the excerpt? I want to do this in the home and all other pages, not only in the given category page.

Thanks!
  #2  
Old Apr 6, 2011, 06:46 PM
daniel3ub
 
26 posts · Jul 2009
Ok, an update.

I know I have to insert an 'if' statement into the loop, that will check if the post is from the given category.

My question is: should I edit the index.php (and exactly where I could put this) or I can use this if into the loop options in ATO?

Thanks!
  #3  
Old Apr 7, 2011, 05:31 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you will want to edit bfa_postparts.php and look at the 'function bfa_post_bodycopy'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Apr 16, 2011, 07:33 PM
daniel3ub
 
26 posts · Jul 2009
I am testing the following in the loop section in Atahualpa options:

Just below the line
PHP Code:
<div class="<?php echo ( is_page() ? 'page ' '' ) . $odd_or_even ' post" id="post-'the_ID(); ?>">
<?php ?>
I inserted the following:
PHP Code:
<?php // make posts from category 49 always Full
$cat_loop get_the_category(get_the_ID());
$cat_loop_zero $cat_loop[0]->cat_ID;
if (
$cat_loop_zero == 49) {
$bfa_ata[excerpts_home] = 'Full Posts'; } ?>
Then, just before the closing </div>:
PHP Code:
<?php $bfa_ata[excerpts_home] = 'Only Excerpts'?>
My "Loop" section for ATO is then:

PHP Code:
<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>
<div <?php if ( is_page() ) { post_class('post'); } else { post_class("$odd_or_even"); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' '' ) . $odd_or_even ' post" id="post-'the_ID(); ?>">
<?php ?>

<?php // make posts from category 49 always Full
$cat_loop get_the_category(get_the_ID());
$cat_loop_zero $cat_loop[0]->cat_ID;
if (
$cat_loop_zero == 49) {
$bfa_ata[excerpts_home] = 'Full Posts'; } ?>

<?php bfa_post_kicker('<div class="post-kicker"><?php get_cat_icon(); ?>','</div>'); ?>
<?php bfa_post_headline
('<div class="post-headline">','</div>'); ?>

<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
<?php bfa_post_bodycopy
('<div class="post-bodycopy clearfix">','</div>'); ?>

<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>

<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>

<?php $bfa_ata[excerpts_home] = 'Only Excerpts'?>
</div><!-- / Post -->
It seems to work (it's not in the production server yet, but working in my testing environment), and I don't need to mess with the theme's files.

Anything wrong with this approach?

Last edited by daniel3ub; Apr 16, 2011 at 07:40 PM.
  #5  
Old Jun 20, 2012, 06:54 PM
gigabrian
 
1 posts · Jun 2012
Hi,

Did this code work in the end?

I am attempting to due the same thing. I'm basically treating a "news" category page as separate to the rest of the blog, and I want to show full posts on this category page while the rest of the blog displays excerpts. I had a look at the code above and as best I can tell bfa_post_parts.php is perhaps different in newer versions of Atahualpa.

I could really use help to set up showing full posts in this category. I'm a bit of a noob/newb, I don't know much about php and I don't even have FTP access for the site I'm working on, so if I cause a parse error I'm in real trouble.

Thanks.
  #6  
Old Jun 21, 2012, 06:43 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
Another option to editing the theme files is to use the List Category Posts plugin which uses a shortcode with attributes you can set to show a particular category and full posts or excerpts or just about anything you want.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Bookmarks

Tags
category, excerpt

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Show Excerpt Only for Specific Post. vintario Excerpts, Read more, Pagination 5 Dec 3, 2010 04:58 AM
[SOLVED] How to delete space between h3 post header and post excerpt in List Category New WordPress Fan Forum How-To 4 Aug 19, 2010 11:12 PM
How to show latest post in certain category as #1 post on front page? efix Center area post/pages 1 Mar 31, 2010 11:58 AM
[SOLVED] Not showing complete post under category debeerj Center area post/pages 5 Feb 18, 2010 10:13 PM
Category title on category page, not on each post excerpt kicker paulae Excerpts, Read more, Pagination 4 Jun 22, 2009 11:33 AM


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


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