If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
What’s the best way to replace the “# Comments” text with the Facebook Like button on the frontpage/archive pages?
For example on the # comments under each thumbnail: http://worlddailyphoto.com/
The comment counter is in several of the loop.php files. I guess you could replace that part of the code with the link to the facebook like button but I’m not sure if it’s simple as that.
For example in loop-index.php. it’s this part:
<?php comments_popup_link(“0 “.__(‘Comments’,’avia_framework’),
“1 “.__(‘Comment’ ,’avia_framework’),
“ “.__(”,’avia_framework’) ); ?>
The last line of my code is a bit different because I took out the Comments Off option.
rumblefish is right – I think this is the best solution. You maybe want to replace the comments code in loop-archive.php too.
Hey Dude, Happy New Year!
When I posted that above code snippet for Lily the site took out the “” tags, so certain characters show up in bold now, instead of as the code is actually written. How do you post code so that you can see it as it’s written?
You can use backtick ( ` ) characters or you need to write
(without space between & and lt/gt;)
instead of < and >
How do you mean use backticks? I have to put ` around the whole code or just the bit with the <> symbols?
The topic ‘How to replace "# comments" on frontpage with a Facebook Like button?’ is closed to new replies.