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 » Comments, trackbacks & pings »

Displaying comments and comment form below each post on multi post pages, in 3.4.x


  #1  
Old Jul 13, 2009, 06:21 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Showing comments and comment form below each post on multi post pages, too:
For Atahualpa 3.4.2+ (This may be an option in later versions)

1. Edit Atahualpa's index.php add the green part:

<?php /* This is the actual Wordpress LOOP.
The output can be edited at Atahualpa Theme Options -> Style & edit the Center column */
$withcomments = 1; bfa_center_content($bfa_ata['content_inside_loop']); ?>


2. At Style & Edit CENTER COLUMN -> The LOOP, add the green part

<?php $withcomments = 1; comments_template(); ?>
</div><!-- / Post -->


3. At Style & Edit CENTER COLUMN -> Below the LOOP, remove this:

<?php /* Load Comments template (on single post pages, and static pages, if set on options page): */
bfa_get_comments(); ?>


Last edited by juggledad; Nov 28, 2009 at 07:40 AM.
  #2  
Old Jul 14, 2009, 04:24 PM
noyell
 
3 posts · Jul 2009
i got this to work.. but it is displaying multiple comments per post... where can i set this to just grab a single comment for each post when its on multipost pages?
  #3  
Old Aug 4, 2009, 03:46 PM
upscho's Avatar
upscho
 
30 posts · Feb 2009
Is there a way to use this also with Atahualpa 3.3.3? Or does it only work with 3.4.2?

Best regards,
upscho
  #4  
Old Aug 8, 2009, 06:55 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
The LOOP is not editable in 3.3.3
  #5  
Old Jun 30, 2010, 09:47 AM
artc1209's Avatar
artc1209
 
10 posts · Nov 2009
Flynn,

Would you explain how to just list existing comments under the post, but omit the empty Comment template, please? (I figure the users can click Leave Comment if they want...)

Thanks,
Art
  #6  
Old Aug 12, 2010, 06:42 AM
Ilke
 
126 posts · Aug 2010
Hi Flynn,

I actually have the same question. Displaying the comments and comment form works fine when I follow your instructions, but I really don't want the comment form to show automatically too. Any solution?

Thanks a lot in advance,
Ilke
  #7  
Old Dec 30, 2010, 12:49 PM
dextor
 
19 posts · Sep 2009
Hi Flynn,

I am also very much interested in a solution that displays the comments to posts, but omits the comment form!

Best whishes from Berlin...Atahualpa rules!

dextor
  #8  
Old Dec 31, 2010, 07:25 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
if you shut off comments for a post, the form won't show for that post, just the existing comments.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Jan 1, 2011, 10:27 AM
dextor
 
19 posts · Sep 2009
yeah, totally correct.

but that would not allow any new comments to be submitted...or am I on the wrong track?

I would like to show the comment form only on a single post page, where the user gets directed through towards the comment-link in the post footer. On the other hand the comment form should
also show up on category-pages that have only one post as content...

I am thinking about using something like this to determine the number of posts

global $wp_query;
$num = $wp_query->post_count;

and then maybe set the single_post flag?

What do you think?

Best wishes

dextor
  #10  
Old Jan 2, 2011, 06:34 AM
dextor
 
19 posts · Sep 2009
Happy New Year BFA-Team!

I don't know why I had so much problems with this, but here is the (kinda easy) solution that I found wich suits my needs:

(i) index.php

Insert Flynn's code

(ii) The LOOP:

In here, I insert this stuff to decide whether or not I want to see the post-footer. If the footer shows up, I also include the comments_template call that Flynn showed.

(Note: post_is_in_descendant_category('35') is a function that I included into wp-includes/functions.php)

Code:
<?php 
/* Show the footer only in project-posts or work-sample pages */
if ( post_is_in_descendant_category('35') OR in_category( array('56', '58') ) ) { 
	
	bfa_post_footer('<div class="post-footer">','</div>'); 


	/**
	 * Load Comments template:
	 *
	 * -> always show existing comments also if it is a multi-post page
	 * -> show the comment form only on single pages or category pages with only one post and open comments
	 **/
	$withcomments = 1; comments_template();


	/* If the footer is displayed, close with a dotted line and padding to the bottom */
	?> <div class="comments-footer-byline"></div> 

<?php } else { 
	/* Show the footer byline instead */
	?>  <div class="post-footer"></div> <?php } ?>
</div><!-- / Post -->

(iii) comments.php

Insert this stuff to show the form only on single post pages (could this maybe become a feature in future releases???)

Code:
<?php		
if ( is_single() ) { 
/* show comment form only, if it is a single page  */
?>
        
<!-- Comment Form -->
<div id="respond">

Thanks for your support!

Best wishes

dextor
  #11  
Old Mar 23, 2011, 09:01 PM
sf410745
 
2 posts · Mar 2011
Thanks Flynn.

But I have another problem,was I want my blog's comments only exist in single post page, how could I do?

Thanks a lot.

Judy
  #12  
Old Mar 24, 2011, 08:52 AM
sf410745
 
2 posts · Mar 2011
Quote:
Originally Posted by STB
That is how it works by default. Nothing you have to do normally.

Can you define your problem?

I didn't define it surely. My problem is after I adjust my blog, the comment area exist in homepage and single post, how could I make it only exist in single post?
  #13  
Old May 28, 2011, 08:27 PM
cssbook's Avatar
cssbook
 
1 posts · May 2011
Yes I did it this way and succeeded! Can also be done with css
Thanks Flynn
__________________
شات الشله

Bookmarks

Tags
comments, homepage, multi post pages



Similar Threads
Thread Thread Starter Forum Replies Last Post
Show actual comments in multi-post pages arbatax Comments, trackbacks & pings 5 May 4, 2013 09:54 AM
[SOLVED] Display 'Post Count' on all MULTI post pages joan Post-Kicker, -Byline & -Footer 1 Nov 18, 2009 04:08 AM
Latest Comment From Each Post on Homepage And Multi-page pages noyell Post-Kicker, -Byline & -Footer 3 Aug 8, 2009 02:39 PM
[SOLVED] Removing tags from multi post pages bushtool Atahualpa 3 Wordpress theme 2 May 31, 2009 11:18 AM
BUG: %comments(' ',' ',' ',' ') no longer works in FOOTER of Multi/Single Post(3.3.2) ianuy Post-Kicker, -Byline & -Footer 2 Apr 15, 2009 01:26 AM


All times are GMT -6. The time now is 04:49 PM.


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