Plug-ins for managing the sidebar include widget logic and sidebar modules (SBM)
(Silly B Mei ~), This article describes how to manually writeCodeTo replace these cumbersome but dazzling plug-ins.
Of course, the "gadgets" option in WordPress 2.7 can also control widgets.
However, after repeated experiments, we found that the style could not be unified and the controllability was low. I personally think it is a relatively chicken feature. I will not talk about it here.
Go to the topic. The Sidebar plug-in displays different content on different pages. We use the WordPress function to determine the current page.
Edit the sidebar. php file in the template. We can add:
<? PHP if (is_home () {?>Your Content<? PHP }?>
In this way, only a widget is displayed on the home page.
We rely on the is_home () function to determine, of course, there are many:
Is_front_page () Homepage
Is_admin () Administrator Account
Is_single ()ArticlePage
Is_page ()
Page
Is_category () Document category page
Is_tag () Article Tab
Is_archive () archive page
Is_404 ()
Page cannot be found
Is_search () search result page
Is_feed () Subscription page