You are here: Home > wordpress > 在WordPress中加入Facebook 讚

在WordPress中加入Facebook 讚

  有了Facebook之後,上網交流似乎是每天必做的事。如果自己的部落格文章可以被更多的人瀏覽、被推薦給更多的網友,只要按下『讚』就可以了。

1、首先進入Facebook的Like Button頁面。

在wordpress加入facebook讚的功能

2、填寫欄位:

URL to Like: 不用急著填網址,請先入一串數字即可,如123
Layout Style: 按鈕的顯示樣式
Show Faces: 是否顯示Facebook
Width: 寬度
Verb to display: 說明
Font: 字型
Color Scheme: 色彩
填好後,按下「Get Code

3、複制 iframe 裡的語法。

 
4、開啟Wordpress的single.php檔(檔案在 wp-content\themes\佈景主題\single.php)

5、找出下列字串一:

<?php the_title(); ?>

將剛剛我們複制的複制碼貼在字串一之後。

6、複制下列字串二

<?php the_permalink() ?>

將字串二取代在之前填入的「123」儲存檔案後,FTP上傳single.php即可。

7.接著就可以在Wordpress的文章內看到Facebook 讚了。

Leave a Reply

You must be logged in to post a comment.

Page 1 of 11