Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
There are a lot of WordPress link module on the Web page only displayed in the article, the practice is to use widget logic plug-ins, you can control any small module in a page is displayed. We all know that WordPress plug-ins more, the Web server is a certain pressure, I am a code-like, can use code to solve the problem, do not use Plug-ins, plug-ins are more like a full of things on my body, so I am not comfortable, today to introduce a way to modify the code, nonsense less said, on the code:
First step: First find wp-includes/widgets.php this file open
Step two: Search for foreach ((array) $sidebars _widgets[$index] as $id) {This Code
Step three: Write the following code behind the second step of the code
if ($wp _registered_widgets[$id] [' name ']== ' link ' &&!strpos ($_server[' php_self '], "wp-admin")) {
if (!is_home ()) re-enters; if (is_paged ()) re-enters;
The above code to achieve the function is, Friendship link this module, will only be shown in the WordPress home page, other pages do not show, on why to do so, please refer to the following article:
Http://www.admin5.com/article/20110629/355998.shtml
Code Description:
$WP _registered_widgets[$id] [' name ']== ' link]
Module title to be masked (depending on the title name of the module)
!strpos ($_server[' php_self '), "Wp-admin")
When the calling module is in the background, remove the mask
if (!is_home ()) re-enters;
In the non-homepage, the shielding module shows
if (is_paged ()) re-enters;
In the article page, the screen module shows
The above content is absolutely original, no plagiarism, by the way send my station: www.i5799.com