Tips for adding a favorite button to WordPress

Source: Internet
Author: User
Tags wordpress blog

 

My blog has always wanted to add a posting function on the blog article page, such as the support, opposition, and nonsense button of the webmaster's house or the dream weaving button similar to "step on, top off, search for online resources and find a similar plug-in for wordpress blogs, called qlwz-digg. If you are interested, you can search for it. But in the end, I still think it is better to use Baidu to Like buttons, and the two lines of code will be done, and it may have a certain impact on SEO In the future, because Baidu officially explained earlier, it indicates that Baidu sharing is helpful to SEO.

Baidu prefers to share it with Baidu on the official website: http://developer.baidu.com /. It is recommended that the webmaster verify the website ownership before adding code to view the effect later. In fact, the official instructions are also very simple, but I will share some tips for installation here, so that your buttons can be easily placed in the desired position, and more conducive to the speed of web page loading.

  

 

Tips for adding a favorite button to a Wordpress blog

1. Select Baidu's favorite button style

The official presentation here is very intuitive, not to mention. The author suggests that you can customize text appropriately to make the favorite button more consistent with your blog name. For example, the custom text of my blog is "niu Ma likes ".

2. Baidu prefers Code adding skills

Many webmasters may directly copy and paste all the code they like to the wordpress topic article page single. php code, but found that do not know the placement location is not beautiful, and even the web page layout is out of order. I have observed that Baidu prefers code. In fact, a piece of code is a loading style, and a piece of code is a loading js. The author's practice is to put Baidu's two-segment code in different places.

First, the style code"

"Inserted into the plug-in code closest to the position I want to place. For example, the plug-in Add Post URL is used on my article page, which is used to automatically Add a copyright notice plug-in, it is the "original article" on my article page. Please note ....." In this section, I put Baidu's style code in the Add Post URL plug-in code, and click plug-in editing. Add:

  

 

Second, I put the js Loading Code in my blog topic to add the statistics code. The advantage of this is that my js Code is directly added and modified through the blog background, to help me adjust the style of buttons I like. Another advantage is that js Code is placed at the bottom of the web page, so that the loading speed is not affected and the content of the blog post is delayed.

I like button tips when adding a WordPress blog to Baidu. This article is a little bit of tips for the author to optimize his blog ~

(Original from, Mu Niu Liu Ma blog: http://guoxun211.com/wordpress-baidulike.html reprint please note !)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.