The method of adding keywords and descriptions to zblogphp website
{php} if($type=='index'){ $keywords = $zbp->option['ZC_BLOG_SUBNAME']; $description = $zbp->option['ZC_BLOG_COPYRIGHT']; }elseif($type=='category'){ $keywords = $category->Name; $description = $category->Intro; }elseif($type=='article'||$type=='page'){ $aryTags = array(); foreach($article->Tags as $key){ $aryTags[] = $key->Name; } if(count($aryTags)>0) $keywords = implode(',',$aryTags); $description = preg_replace('/[\r\n\s]+/', '', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),100)).'...'); }{/php}{if isset($keywords)&&strlen($keywords)>0}<meta name="keywords" content="{$keywords}" />{/if}{if isset($description)&&strlen($description)>0}<meta name="description" content="{$description}" />{/if}
<meta name="description" content="Description"/> <meta name="keywords" content="keywords"/>
Can't find a tutorial that can solve your problem?
-
Charging zblogphp template The 9th zblog enterprise theme of Tianxing Studio has its own form to submit email reminders, etc zero 2019-12-11 seventeen thousand four hundred and ten Price: four hundred and sixty-eight Online purchase -
Charging zblogphp template Tianxing Studio ppt download template is suitable for sites with resources to sell vips one 2019-10-03 thirteen thousand seven hundred and sixty-four Price: one hundred and ninety-nine Online purchase -
Wordpress template Tianxing Studio wordpress download station theme is applicable to software/app/game and other download stations zero 2022-05-06 twelve thousand three hundred and eighty-seven Price: three hundred and fifty-five Online purchase -
Charging zblogphp template Tianxing Studio zblogphp enterprise theme 6 Self configurable atmosphere zblog enterprise theme two 2018-06-26 forty-nine thousand nine hundred and eighty-six Price: two hundred and fifty-eight Online purchase
Related recommendations
-
Zblogphp comes with a complete set of js framework comment interfaces 12-04 -
The zblogphp hook interface inserts the specified content into the article body 07-14 -
In 2020, version 1.6 of zblog will finally go online 03-26 -
The call tags of the total number of articles and comments called by zblogphp 03-16 -
Discussion on setting tags for zblogphp comments 08-04 -
Zblog 1.5 officially released: Z-BlogPHP 1.5 Zero Released! 10-31 -
Zblogphp determines whether the user logs in 10-21 -
Zblogphp obtains articles of multiple categories and sorts them according to the specified requirements (the latest hot reviews) 04-18 -
Can ZBLOG PHP use PHP 7? 01-19 -
Solution to the conflict between zblogphp theme template and SEO tools plug-in, which leads to the inability to display keywords and descriptions 06-22 -
Zblogphp's Pits: Why are sub classified articles not displayed under the parent category? 06-15 -
Precautions for the use of Z-BlogPHP on HiChina free virtual host 06-12 -
Zblogphp image immobilizer code Other files are also available 05-20 -
The zblogphp 1.4 support column page describes 03-02 -
Advanced Tutorial zblogphp Add jq Color Palette in the Background 02-28 -
Zblogphp calls the method with the most comments for the latest and hottest articles 02-03
yes five Comments from netizens:
-
A little welfare Six years ago (2018-07-25) reply Modified, but not effective, Tang Shijun's blog template -
Tianxing Studio Six years ago (2018-07-25) reply The Tang Shijun theme comes with this function, which is in the theme configuration in the upper right corner of the background
-
-
A rainy night 10 years ago (2014-11-26) reply None of my business...
-
visitor 10 years ago (2014-11-20) reply After the call, the keyword displays garbled code. How can I solve this problem, -
Tianxing Studio 10 years ago (November 21, 2014) reply Coding problem. Zblogphp does not recommend that you change to a free plug-in for use
-
welcome you Comment:
Cancel Reply
-
Zblog enterprise theme -
Zblog image theme -
Zblog resource topic -
Zblog CMS topic -
Wordpress template -
Zblog video theme -
Zblog Taobao guest theme -
Zblog navigation topic
Select a theme?
-
Latest articles -
Hot article ranking -
Most Comments
-
one Shopping activity on the official website of Tianxing Studio: unlimited number of times and amount of 20% discount coupons 04-17 -
two Tianxing Studio zblog pure blog theme vue3+applet dual version 03-19 -
three Error causes and solutions of introducing vant into vue3 project 03-12 -
four Tianxing Studio zblog encyclopedia theme can be matched with member plug-ins to realize knowledge payment profitability 03-06 -
five How does zblog intercept a summary with a specified number of words? Introduction to the custom interception method of zblog summary 02-29 -
six Tianxing Studio 2023 Double 11 Event: 50% discount coupons 11-05 -
seven Tencent Cloud 2023 Double 11 Activity: 2H2G3M lightweight server 88 new users for one year 11-05 -
eight AliCloud 2023 Double 11 Activity: 2-core 2G3M bandwidth ECS 99 yuan/year! 10-31 -
nine Tianxing Studio zblog free login paid reading plug-in supports Alipay WeChat payment Hupi Pepper payment 10-09
-
Label aggregation -
×1 Lightweight server ×1 2 years for renewal ×1 Circle of friends ×1 Updated zblog topics ×1 Decoration website ×1 Lu Songsong Theme PHP Version ×1 Musty gas ×1 IETester ×1 Zblog page settings ×1 Red brown yellow color matching ×1 Widescreen theme ×1 transform ×1 Zblog registration function ×1 Advertising Space Collection ×1 name ×1 Emlog We Media Template ×1 Code highlighting ×1 Zblog call tag ×1 Cost effective imitation polymerization ×1 Google Online Font Library
Latest comments
-
Tianxing Studio 07-05 See the update record, which was updated on the 29th of last month Commented on: Tianxing Studio zblog novel station theme online multiple/single novel switching can open the charging function -
visitor 07-05 Is this topic still updated Commented on: Tianxing Studio zblog novel station theme online multiple/single novel switching can open the charging function -
Tianxing Studio 06-15 Open the editing text, select the code language, and then whether you enter and break lines or copy and paste, it will not be divided into one line and one box, so I don't understand how you did it Commented on: Introduction to the code for zblog to determine whether the plug-in is installed or enabled -
visitor 06-14 Many lines of code posted in zblog articles are divided into one line and one box, one line and one box. How to adjust the code to be the same as yours in one box Commented on: Introduction to the code for zblog to determine whether the plug-in is installed or enabled -
Tianxing Studio 06-13 This function is already available Commented on: Tianxing Studio zblog navigation single page plug-in: every webmaster needs a dedicated navigation page!