Home  >  Article  >  Web Front-end  >  wordpress calls different css_html/css_WEB-ITnose according to different pages

wordpress calls different css_html/css_WEB-ITnose according to different pages

WBOY
WBOYOriginal
2016-06-24 11:48:411321browse

<?php if ( is_home() ) { ?>//如果是主页   <link rel="stylesheet" href="cssA" type="text/css" />   <?php } elseif( is_single() ) { ?>//如果是文章内页   <link rel="stylesheet" href="cssB" type="text/css" />   <?php } elseif( is_archive() || is_search() ) { ?>//如果是搜索页面   <link rel="stylesheet" href="cssC" type="text/css" />   <?php } elseif( is_page(1028) ) { ?>//如果是ID为1028的页面   <link rel="stylesheet" href="cssD" type="text/css" />   <?php } elseif( is_category(1314) ) { ?>//如果是ID为1314的分类   <link rel="stylesheet" href="cssE" type="text/css" />   <?php } else { ?>//其余的页面   <link rel="stylesheet" href="cssF" type="text/css" />   <?php } ?>


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn