Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #7896

    Hi there,

    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/

    Thanks,

    Lily

    #59613

    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:

    <span class=’comment-container’>

    <?php comments_popup_link(“0 “.__(‘Comments’,’avia_framework’),

    1 “.__(‘Comment’ ,’avia_framework’),

    % “.__(‘Comments’,’avia_framework’),’comments-link’,

    “.__(”,’avia_framework’) ); ?>

    </span>

    The last line of my code is a bit different because I took out the Comments Off option.

    #59614

    Hey,

    rumblefish is right – I think this is the best solution. You maybe want to replace the comments code in loop-archive.php too.

    #59615

    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?

    rich

    #59616

    Ha! It did it again!

    #59617

    You can use backtick ( ` ) characters or you need to write

    & gt;

    and

    & lt;

    (without space between & and lt/gt;)

    instead of < and >

    #59618

    How do you mean use backticks? I have to put ` around the whole code or just the bit with the <> symbols?

    #59619

    You need to put it around the whole code :)

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘How to replace "# comments" on frontpage with a Facebook Like button?’ is closed to new replies.