简体   繁体   中英

add icon (font-awesome) to trackbacks & pingbacks

Maybe is a simple question, but I'm trying to add an icon for tracbacks and pingbacks in my comment page of wordpress. If every comment have an user avatar I wanna each tracback and pingback have same font-awesome icon like avatar user.

Is this posible? Anybody know how to do it?

As always, thanks in advance

I resolved this issue.

I searched in my functions.php comment function and change

<?php get_avatar($comment, 96)?>

for this:

<?php $avatar=get_avatar($comment, 96);
            if (!$avatar) {
            echo '<i class="icon-XXX icon-2x pull-right" style="color:#d9534f</i>';//You can use a img too o whatever
            } else {
            echo $avatar;
            } ?>

This code works cause pingbacks and tracbacks return false to get_avatar ;)

I hope this will be helpful for somebody

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM