閱讀900 返回首頁    go 中電雲集


wordpress常用模板函數介紹

1.WP內置的bloginfo函數

在header.php頁麵中:

<h1><a href=”<?php bloginfo(’url’); ?>” title=”<?php bloginfo(’name’); ?>”><?php bloginfo(’name’); ?></a></h1>

<p><?php bloginfo(’description’); ?></p>

bloginfo(’url’)為返回網站主頁鏈接.

bloginfo(’name’)返回網站標題

bloginfo(’description’)返回網站描述

2.WP內關於博文內容content的函數

the_ID():返回博文 ID;

the_permalink():返回博文固定鏈接 URL;

the_title():返回博文標題;

the_time(’M’):返回發表日期中的月份;

the_time(’d’):返回發表日期中的天;

the_author():返回博文作者;

the_category():返回博文的類別;

the_content():返回博文的內容,其中的參數表示用於“更多內容”的鏈接文本;

最後更新:2017-01-04 22:34:41

  上一篇:go 網站訪問速度緩慢的檢查與處理
  下一篇:go FTP常見問題處理