Home > Backend Development > PHP Tutorial > php-WORDPRESS PHP标题写法的问题

php-WORDPRESS PHP标题写法的问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 11:33:04
Original
1080 people have browsed it

php

现在网站标题代码如下:



| $category[0]->cat_name;?> | echo trim(wp_title(”,0)); if ( $paged >= 2 || $page >= 2 ) echo ‘ – ‘ . sprintf( __( ‘绗�%s椤�’ ), max( $paged, $page ) ); echo ‘ | ‘ ; bloginfo(‘name’); } ?>

显示效果为:文章名|分类名|站点名。

在我的主题中有个名为Featured的分类名,是主题自带的,为了显示文章幻灯片,即只要在发表文章把文章同时归类到Featured分类里它就会在首页幻灯里出现。问题是,一旦文章被设为Featured,文章标题就变为了:文章名|Featured|站点名,我想让不显示这个Featured的,而显示它本来的分类名。

试着加了个这样的语句:if ($category[0]->cat_name!=’Featured’) {echo $category[0]->cat_name; },但是不管用。

求指点。

Related labels:
php
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template