站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Post Meta Data Section
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
== 添加模板标签 == 到目前为止,你涉及了可以加入''文章 meta数据''的仅仅三种标签。你可以添加<tt> [[WordPress:Template Tags/the_title|the_title()]]</tt>来得到文章的标题。如果你想要作者的名字 ,你可以添加<tt>[[WordPress:Template Tags/the_author|the_author()]]</tt>,还可以添加<tt> [[WordPress:Template Tags/the_author_email|the_author_email()]]</tt>以得到作者的电子邮件。想 要某个作者的所有文章的连接?可以使用<tt>[[WordPress:Template ags/the_author_posts_link|the_author_posts_link()]]</tt>来安排妥当。 如果你想包括更基本的信息比如网站使用的标题,使用<tt>[[WordPress:Template Tags/bloginfo|bloginfo()]]</tt>或者[[WordPress:Next_and_Previous_Links|导航帮助]]如<tt> [[WordPress:Template Tags/previous_post|previous_post()]]</tt>和<tt>[[WordPress:Template Tags/next_post|next_post()]]</tt>?我们使用WordPress 1.5.1.3+的使用者可用的,上一个和下一个 文章模板标签来列出同一列表中的文章。这些只是''文章 meta数据''中很多可能的模板标签用法的几个 例子。 在最简单的用法中,''文章 meta数据''可以如下列出 <pre>POST TITLE: <?php the_title(); ?><br /> AUTHOR: <?php the_author(); ?><br /> POSTED: <?php the_time('jS F Y') ?><br /> FILED AS: <?php the_category(', ') ?><br /> COMMENT FEED: <?php comments_rss_link('RSS 2.0'); ?><br /> PREVIOUS: <?php previous_post('%', '', 'yes', 'yes'); ?><br /> NEXT: <?php next_post('%', '', 'yes', 'yes'); ?></pre> 显示如下: <div style="border:1px solid #afafca; width: 50%; margin: 10px; padding:20px">POST TITLE: [[WordPress:#Adding Template Tags|WordPress Makes Me Smile]]<br /> AUTHOR: [[WordPress:#Adding Template Tags|Harriet Smith]]<br /> POSTED: 20 April 2004<br /> FILED AS: [[WordPress:#Adding Template Tags|WordPress]], [[WordPress:#Adding Template Tags|News]]<br /> COMMENT FEED: [[WordPress:#Adding Template Tags|RSS 2.0]]<br /> PREVIOUS: [[WordPress:#Adding Template Tags|Things to Do With WordPress]]<br /> NEXT: [[WordPress:#Adding Template Tags|Why I Like WordPress]]</div> 如果你想让这些内容显示在边栏中,而且你想要一个会话式的样式,那么在你的[[WordPress:Templates| 模板文件]]中,<tt>sidebar.php</tt>,找一个地方输入以下内容: <pre><div class="postmetadata"><p>You are reading the article, <?php the_title(); ?>, on our website, <?php bloginfo('name'); ?>. This article was written on <?php the_time('jS F Y') ?>, in Seattle, Washington, and you can find similar articles in the <?php the_category(' and ') ?> categories, or more articles by <?php |the_author_posts_link() ?>, if you enjoyed this article. If you have any comments about this article, you can contact <?php the_author() ?> by <a href="mailto:<?php the_author_email(); ?>"> email</a>, or leave a comment below. You can also follow comments made on this article via our <?php comments_rss_link('RSS 2.0'); ?> feed.</p> <p>If you would like to continue reading more, <?php previous_post('the previous article on our site is called %', ' ', 'yes', 'yes'); ?> <?php next_post(' and the next article is called %', ' ', 'yes', 'yes'); ?>. Thank you for visiting our site.</p></div></pre> 这个例子如果被规划在一个大多数边栏的窄栏目中,将显示如下: <div style="border:1px solid #afafca; width: 40%; margin: 10px; padding:20px; font-size: 95%">You are reading the article, [[WordPress:#Adding Template Tags|WordPress Makes Me Smile]], on our website, [[WordPress:#Adding Template Tags|Talking Blog]]. This article was written on May 15, 2004, in Seattle, Washington, and you can find similar articles in the [[WordPress:#Adding Template Tags|WordPress]] and [[WordPress:#Adding Template Tags|Blog]] categories, or more articles by [[WordPress:#Adding Template Tags|Harriet Smith]], if you enjoyed this article. If you have any comments about this article, you can contact Harriet Smith by [[WordPress:#Adding Template Tags|email]], or leave a comment below. You can also follow comments made on this article via our [[WordPress:#Adding Template Tags|RSS 2.0]] feed. If you would like to continue reading more, the previous article on our site is called [[WordPress:#Adding Template Tags|Things To Do With WordPress]] and the next article is called [[WordPress:#Adding Template Tags|Why I Like WordPress]]. Thank you for visiting our site.</div> 这只是开始,有很多[[WordPress:Blog_Design_and_Layout|设计你的''文章 meta数据'']]的方法:通过 把它放入文本框,把它变为文本的一部分,把它在列表中列出等等。这都取决于你希望如何设计你的'' 文章 meta数据'',和你想通过你的文章分享什么样的信息。
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)