Menu

条件语句输出不同侧边栏块

2010/06/24 0 Min Read

不同页面输出不同的侧边栏块。

  • 判断是否为首页:  [code type=php]<?php if ( is_home() ) { ?>[/code]
  • 判断是否为文章页 :  [code type=php]<?php if ( is_single() {?>[/code]
  • 判断是否为Page页: [code type=php]<?php if ( is_page() {?>[/code]
  • 判断是否为存档页: [code type=php]<?php if ( is_category(){?>[/code]

完结后勿忘<?php }?>结束判断语句。

Written By

博主小雪出沒於魔都,目前工作是後端程序員,喜歡旅遊,特別是文化歷史遺跡和博物館,一生所愛日本彩虹樂隊 ( L'Arc-en-Ciel) ,家有橘貓朵朵一隻。

Leave a Reply

Leave a Reply

您的电子邮箱地址不会被公开。 必填项已用 * 标注

了解 花開未央 的更多信息

立即订阅以继续阅读并访问完整档案。

Continue reading