add_filter ( 'the_content' , 'add_author_link' ) ; function add_author_link ( $ content ) { if ( is_single ( ) ) $ content . = '
Tài liệu này được ghi được bởi '
. get_the_author_meta ( 'display_name' ) . '' ; return $ content ; }
In the previous tutorial, we introduced you to several steps to validate copyright in each article with Google, but what if you want to do the same in WordPress?
TipsMake.com - In the previous tutorial, we introduced you to some steps to validate copyright in each article with Google , but what if you want to do the same in WordPress? ?
In essence, WordPress uses a template system to display information in the content section, so adding a rel = 'author' tag will require some customization in the theme. Actually there are quite a few ways to do this, in the article below we will introduce you to the simplest and easiest to implement.
First, make sure to set up an About page with basic information about you and the main purpose of the blog site. At the bottom of this About page, insert the path:
Follow me on Google +
And remember to replace http:/// your-google-profile-url with your Google Profile link . Note that the Google Profile link will be in the form of https://plus.google.com/1234567890987654321
Next, use the Theme Editor function and open the functions.php file, insert the following code at the end of this file:
add_filter ( 'the_content' , 'add_author_link' ) ; function add_author_link ( $ content ) { if ( is_single ( ) ) $ content . = '
Tài liệu này được ghi được bởi '
. get_the_author_meta ( 'display_name' ) . '' ; return $ content ; }
Save this file, and from this point onwards at the end of each of your posts there will be an introduction line in the form: " This article is written by . "
Collect enough information to update the Jabber / Google Talk school in the Profile section of Google Profile . Next, open the functions.php file and insert the code below:
add_filter ( 'the_content' , 'add_author_link' ) ; function add_author_link ( $ content ) { if ( is_single ( ) ) { $ content . = '
Follow this author at .get_the_author_meta ('jabber') .'"rel =" author "> Google+
' ; } return $ content ; }
The main function of the above lines of code is to aggregate information through the Google Profile URL from the author's Jabber / Gtalk field and insert it at the end of the article. However, this process will last from about 1-2 weeks for Google to update and display the full picture of the author's Profile in the search results returned, and you can use the Rich Snippest Test utility Tool to preview the interface of the website when searched. Good luck!