WordPress.org

Ready to get started?Download WordPress

Forums

Facebook like button for each Single page. (2 posts)

  1. Strongfist
    Member
    Posted 2 years ago #

    Hey guys,

    On my website, getyourgadgetsgoing.com I want to place a facebook like button at the bottom of each article in a similar fashon to Engadgets method.

    I attempted to use the like button generator found on facebook and this is the code they give me:

    <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=141369432604089&xfbml=1"></script><fb:like href="getyourgadetsgoing.com" send="true" width="450" show_faces="true" font="arial"></fb:like>

    As you can see, it only allows me to generate it for a single page. What code should i use for the code to automatically insert what ever the link to the current page the users is viewing?

  2. donuthole
    Member
    Posted 2 years ago #

    If this code is in the WordPress loop, change the href code from "getyourgadgetsgoing.com" to "<?php the_permalink();?>" and it will put the link to the post instead.

Topic Closed

This topic has been closed to new replies.

About this Topic