Custom header information output

  • The current applicable version is 0.8 (10.8.15)
  • Sorting time: January 6, 2012

Default Output

In the default template, the output result of header information is as follows

 < meta  name = "description"  content = "Just So So ..."  / >
 < meta  name = "keywords"  content = "typecho,php,blog"  / >
 < meta  name = "generator"  content = "Typecho 0.8/10.8.15"  / >
 < meta  name = "template"  content = "default"  / >
 < link  rel = "pingback"  href = ".../action/xmlrpc"  / >
 < link  rel = "EditURI"  type = "application/rsd+xml"  title = "RSD"  href = ".../action/xmlrpc?rsd"  / >
 < link  rel = "wlwmanifest"  type = "application/wlwmanifest+xml"  href = ".../action/xmlrpc?wlw"  / >
 < link  rel = "alternate"  type = "application/rss+xml"  title = "RSS 2.0"  href = ".../feed/"  / >
 < link  rel = "alternate"  type = "application/rdf+xml"  title = "RSS 1.0"  href = ".../feed/rss/"  / >
 < link  rel = "alternate"  type = "application/atom+xml"  title = "ATOM 1.0"  href = ".../feed/atom/"  / >

Operation function

Open the header.php file in the template and find the following sentence

 <? php  $this -> header ( ) ;  ?>

Add the parameters you want to set, such as:

 <? php  $this -> header ( 'keywords=&generator=&template=&pingback=&xmlrpc=&wlw=' ) ;  ?>

The above code can filter the output of keywords, programs, template names, article references, offline writing and other information. The specific effect is as follows.

 < meta  name = "description"  content = "..."  / >
 < link  rel = "alternate"  type = "applicationrss+xml"  title = "RSS 2.0"  href = ".../feed/"  / >
 < link  rel = "alternate"  type = "application/rdf+xml"  title = "RSS 1.0"  href = ".../feed/rss/"  / >
 < link  rel = "alternate"  type = "application/atom+xml"  title = "ATOM 1.0"  href = ".../feed/atom/"  / >

Operating parameters and method description

parameter

  • Keywords: keywords
  • Description: Description, Summary
  • rss1:feed rss1.0
  • rss2:feed rss2.0
  • atom:feed atom
  • Generator: program version, etc
  • Template: template name
  • Pingback: article reference
  • Xmlrpc: offline writing
  • Wlw: an offline writing tool for m $
  • CommentReply: comment reply

explain

If the equal sign (=) is empty, the item will not be output. All parameters are connected with "&". If you need to customize the rss address, just fill in the rss2=feed subscription address.

Print/Export
language
  ?