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 »

[SOLVED] pingbacks not acknowledged in


  #1  
Old Jan 13, 2011, 10:02 PM
derekwbeck
 
151 posts · Nov 2010
[SOLVED] pingbacks not acknowledged in

I can't figure this out, and am now wondering if it is an ATA 3.5.3 issue: In comments.php I've added in the separate trackbacks/comments section the following code: (see my related post)

Code:
if ( ! empty($comments_by_type['pings']) ) : //only placed in if there are indeed pingbacks
	
			echo "inside"; 
			
			echo "<BR><h3 id='comments'>Pingbacks:</h3>";
			echo "<div id='pings'>";

			wp_list_comments('type=pings&callback=list_pings');
		
			echo "</div>";
			
		endif;
		//end add-in
This is apparently the standard way to go about this with others, but it my if statement is being completely ignored here. That is, it never gets inside, even on pages with pingbacks. (Note, the code inside the if statement works as expected if I get rid of the if statement.) So, something is wrong with the if statement, and I don't think it is the code or logic itself. Rather, I wonder if ATA 3.5.3 does not have the function

Code:
! empty($comments_by_type['pings'])
Does anyone have insights on this?

Thanks,
Derek
http://www.1775thebook.com

Last edited by derekwbeck; Jan 13, 2011 at 10:03 PM. Reason: signature
  #2  
Old Jan 15, 2011, 02:39 AM
derekwbeck
 
151 posts · Nov 2010
I'm more and more convinced some variable is missing within the ATA framework... see how I deduced this at

http://wordpress.org/support/topic/w...uble?replies=5
  #3  
Old Jan 15, 2011, 05:22 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Where did you set $comment_by_type? Is it a local or global variable?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Jan 15, 2011, 11:30 AM
derekwbeck
 
151 posts · Nov 2010
code at the very tail of functions.php:

Code:
<?php  

//add-in by derek beck for 
//from www.wphacks.com/separating-trackbacks-from-comments-in-wordpress-2-7/
		
function list_pings($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
?>
<li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?>
<?php } ?>
<?php
add_filter('get_comments_number', 'comment_count', 0);
function comment_count( $count ) {
if ( ! is_admin() ) {
global $id;
$comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
return count($comments_by_type['comment']);
} else {
return $count;
}
}
//end add-in
?>
following the instructions from http://wphacks.com/separating-trackb...wordpress-2-7/

Last edited by derekwbeck; Jan 15, 2011 at 11:59 AM.
  #5  
Old Jan 15, 2011, 05:07 PM
derekwbeck
 
151 posts · Nov 2010
Juggledad, got your reply by email, but it somehow did not post here. In the email you wrote:

Quote:
So you have created a local variable in function.php and another in comments.php. They are independent of each other. Try making them both a global.
How do I set a global variable?
  #6  
Old Jan 16, 2011, 04:53 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Do a google search
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with showing Trackback and Pingbacks, on Post page law Comments, trackbacks & pings 3 Sep 17, 2009 08:30 AM
allowing "Pings" ?? trackbacks and/OR pingbacks ?? Shepherd Jim Comments, trackbacks & pings 3 Sep 8, 2009 12:38 PM
Changing displayed text and style of trackbacks and pingbacks Gravity Comments, trackbacks & pings 1 Sep 8, 2009 09:47 AM


All times are GMT -6. The time now is 01:25 PM.


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