![]() |
[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 Code:
! empty($comments_by_type['pings']) Thanks, Derek http://www.1775thebook.com |
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 |
Where did you set $comment_by_type? Is it a local or global variable?
|
code at the very tail of functions.php:
Code:
<?php |
Juggledad, got your reply by email, but it somehow did not post here. In the email you wrote:
Quote:
|
Do a google search
|
I added
global $comments_by_type; just after global $id; in the code above, in functions.php, but nothing changes... any ideas? |
doing that will make it a global in functions.php, but what about in comments.php? without naming it a global there, it is still a local variable and different from the global even though they have the same name.
|
I figured merely adding
global $comments_by_type; to comments.php would solve it... which I added just before the if statement above that is not successfully being entered, but that did not solve it. Am I declaring these globals right? |
looks like it, I add some echo statements in to see if the value you think should be there is really there.
HTML Code:
echo '<strong>comments_by_type='.$comments_by_type.'</strong><br>'; |
hmm... I've tried such echo statements too... I get nothing for the variable. Using your code, I simply get:
comments_by_type= so perplexing... thank you for your steadfast assistance juggledad! |
Okay, I've figured it out... comments_by_type requires a strange explicit declaration, in the comments.php, as follows:
Code:
$comments_by_type = &separate_comments($comments); //strangely, this has to be declared explicitly Thus, the entire code to separate out trackbacks (be sure to select "Yes" for this in the ATA theme under comments!!) is as follows: In the comments.php, where you find the following: Code:
wp_list_comments(array( Code:
Code:
<?php See my site below for examples in the blog entries... Hope this is useful for someone! Derek Beck www.derekbeck.com/1775 |
All times are GMT -6. The time now is 08:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.