By: Frank Bültge
<code>if ( empty($comments_by_type['pingback']) ) {</code> Das fragt ab, ob es pingbacks gibt, wenn nein, dann wird auch nichts ausgegeben.
View ArticleBy: Robert
Davon bin ich auch ausgegangen, leider funktioniert das offenbar nicht. Der Code im Zusammenhang: <pre> if ( empty($comments_by_type['pingback']) ) { ?> </pre> Leider bekomme ich als...
View ArticleBy: Frank Bültge
nein, empty ist kein PHP5 Problem und hier wird nur gefragt, ob es Einträge gibt, sonst gib nix aus, was in meinen Tests auch sauber klappt.
View ArticleBy: Markus
Hi Frank, ich kann das kleine Problem von Robert bestätigen. Sofern keine Tracks oder Pings vorhanden sind wird sowohl die Headline "Keine Trackback" bzw. "keine Pingback" ausgegeben als auch eine...
View ArticleBy: Frank Bültge
@Markus: ok, schaue es mir nochmal an; eventuell reicht es wenn man die Prüfung negiert, mit <code>!empty($comments_by_type['pingback'])</code>.
View ArticleBy: Mark
Danke Frank, das wars schon ... mit der Negierung funktioniert es. Bin gerade über dem Styling meiner Kommentare im neuen Template und gleich über eine weitere Sache gestolpert: Wie lassen sich die...
View ArticleBy: Markus
Noch ein Nachtrag: Beim Bau meines Themes ist mir aufgefallen, dass bei Nutzung einer individuellen Ausgabe der Kommentare per Callback grundsätzlich ein schließendes /li ausgeben wird. Am Beispiel...
View ArticleBy: Frank Bültge
@Markus: stimmt, habe ich auch bemerkt, wollte es aber noch prüfen. Finde es sehr komisch.
View ArticleBy: tarvos
Ich hab das jetzt auch mal so eingebaut und hab bisher auch das Problem, dass bei der Kombination kein Trackback/Kommentar das ol Tag der Trackbacks angezeigt wird. Aber mir ist auch nicht so ganz...
View ArticleBy: Alex
Hello, I have some problems with reference from fb_update_comment_type_cache function with PHP 5.3.0. It works fine without it but I don't really know the utility of that function. Hope you speak...
View ArticleBy: Frank Bültge
@Alex: this function is only for reset the cache of WordPress when it add a comment.
View ArticleBy: Alex
Thanks for quick answer. And what's happen when I remove & from function fb_update_comment_type_cache(&$queried_posts) There is some incompatibility with reference in PHP 5.3.0 Regards, Alex
View ArticleBy: Alex
Another problem, does not seem to work on attachments. Did you know about this or it's just me? Also, update_comment_type_cache() does not exists, it's fb_update_comment_type_cache() right? Regards, Alex
View ArticleBy: Frank Bültge
@Alex: yes, this is the correct function. Please see the <a href="http://code.google.com/p/wp-basis-theme/" rel="nofollow">WP Basis Them</a>e, i use this function on this theme and you can...
View ArticleBy: Alex
Thanks for the elucidation. Any clues about that attachments problem? Regards, Alex
View ArticleBy: Alex
Not really, the attachment default template is single.php For example on posts (single.php) comments/trackbacks number are displayed but on attachments (same template - single.php) are not.
View ArticleBy: Frank Bültge
@Alex: i dont understand the problem with the attachments; please can you write more infos. My functions are filter for track-, pingbacks and comments, not attachments. Sorry and i hope you can send me...
View ArticleBy: Alex
Yes, but you can add comments to attachments right? This is my problem. echo fb_get_comment_type_count('comment') ---- does not display anything on attachment page.
View ArticleBy: Frank Bültge
@Alex: ok, also the attachment-Template or the default template with a attachment. I will test this and write a solution.
View ArticleBy: Perun
Hallo Frank, beim studieren deienes Codes ist mir die gleiche Frage wie bei Mark (<a href="http://bueltge.de/zaehler-fuer-kommentare-track-und-pingbacks-ab-wordpress-27/878/#comment-321960"...
View ArticleBy: Frank Bültge
@Perun: im Code habe ich das aktuell nicht drin, in einer anderen Seite mache ich das via JS, da es nur dann Mehrwert ist, wenn JS aktiv ist: <code> <script type="text/javascript">...
View ArticleBy: Christian
Danke für den Code! War genau das, wonach ich gesucht habe. Grüße Christian
View Article
More Pages to Explore .....