Php
Now the website title code is as follows:
–
| $category [0]->cat_name;? > |
echo trim(wp_title(”,0)); if ( $paged >= 2 || $page >= 2 ) echo ‘ – ‘ . sprintf( __( ‘绗�%s椤�’ ), max( $paged, $page ) ); echo ‘ | ‘ ; bloginfo(‘name’); } ?>
Display effect: Article name | category name | site name.
In my theme, there is a category name named Featured, which comes with the theme, in order to show the article slide, that is, as long as the article in the publication of the articles into the featured classification, it will appear in the first page slide. The problem is that once the article is set to featured, the title of the article becomes: article name | featured| site name, I want to let not show this Featured, and display its original classification name.
Try adding a statement like this: if ($category [0]->cat_name!= ' Featured ') {echo $category [0]->cat_name;}, but it doesn't work.
Ask for advice.