Php-wordpress the question of PHP title writing

Source: Internet
Author: User
Keywords Php
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.