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, 06:13 PM
daniel3ub
 
26 posts · Jul 2009
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, 07: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, 06: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, 08: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 08:40 PM.
  #5  
Old Jun 20, 2012, 07: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, 07: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.
  #7  
Old Jun 21, 2012, 08:51 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Quote:
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.
if you don't know what you are doing and don't have FTP access, you should not touch the files
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #8  
Old Jul 9, 2012, 06:25 PM
markzip
 
60 posts · Jan 2010
Larry,
I don't understand how List Category Posts might work for me in this case.
I too am trying to make The "category" page for a given category display the entire post filed under that category. (I am using categories as navigation and there is only one post associated with this category)
But, when I have used List Category Posts before on a different site, it has been on a proper PAGE and I used it to pull in posts in a given category. I can't imagine how it is applicable here.

So I want to do what the OP wants to do, use excerpts on most category pages and if there is only one post in a given category, have that show up as a full post on the category page.

TIA
  #9  
Old Jul 9, 2012, 09:04 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
I know of no way to have category pages with only one post shoe the complete post. That would require some programing. I read this post fast and didn't clearly understand the need.
__________________
~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.
  #10  
Old Jul 10, 2012, 03:33 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Th code from post 4 would have to be added to index.php
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Tags
category, excerpt



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 05: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 20, 2010 12:12 AM
How to show latest post in certain category as #1 post on front page? efix Center area post/pages 1 Mar 31, 2010 12:58 PM
[SOLVED] Not showing complete post under category debeerj Center area post/pages 5 Feb 18, 2010 11:13 PM
Category title on category page, not on each post excerpt kicker paulae Excerpts, Read more, Pagination 4 Jun 22, 2009 12:33 PM


All times are GMT -6. The time now is 12:20 PM.


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