Home > Web Front-end > HTML Tutorial > 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
Release: 2016-06-24 11:48:41
Original
1354 people have browsed it

<?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 } ?>
Copy after login


source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template