站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress日志元数据
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
==添加模板标签== 到目前为止我们只认识了三个可以添加到日志元数据中的模板标签。实际上很多标签都可以添加到日志元数据中。我们可以用[http://www.wordpress.la/codex-%E6%A8%A1%E6%9D%BF%E6%A0%87%E7%AD%BE-the_title%28%29.html the_title]来获取日志标题,用[http://codex.wordpress.org/Template_Tags/the_author the_author()]获取日志作者姓名,也可以用[http://codex.wordpress.org/Template_Tags/the_author_email the_author_email()]来获取日志作者的Email地址,甚至可以用[http://codex.wordpress.org/Template_Tags/the_author_posts_link the_author_posts_link()]获取某个作者所有日志的链接。 我们还可以用 [http://www.wordpress.la/codex-%E6%A8%A1%E6%9D%BF%E6%A0%87%E7%AD%BE-bloginfo%28%29.html bloginfo]来添加网站名称等基本信息,或者用[http://codex.wordpress.org/Template_Tags/previous_post previous_post()] 和[ title="Template Tags/next post" href="http://codex.wordpress.org/Template_Tags/next_post next_post()]为访问者[http://www.wordpress.la/codex-%E2%80%9C%E4%B8%8A%E4%B8%80%E7%AF%87%E2%80%9D%E5%92%8C%E2%80%9C%E4%B8%8B%E4%B8%80%E7%AF%87%E2%80%9D%E5%AF%BC%E8%88%AA%E9%93%BE%E6%8E%A5.html 导航]。使用WordPress 1.5.1.3之后版本的访问者在浏览某一分类下的日志时,我们可以利用“上一篇”和“下一篇”模板标签为他们显示存档日志。下面是模板标签在<EM>日志元数据</EM>中众多用法的几个示例。 在最简单的示例中,日志元数据是: 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'); ?> 在网页上的显示结果是: *POST TITLE: [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags WordPress Makes Me Smile] *AUTHOR: [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags Harriet Smith] *POSTED: 20 April 2004 *FILED AS: [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags WordPress], [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags News] *COMMENT FEED: [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags RSS 2.0] *PREVIOUS: [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags Things to Do With WordPress] *NEXT: [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags Why I Like WordPress] 如果希望日志元数据显示在侧边栏中,并且希望日志元数据带有对话风格,可以在模板文件sidebar.php中,找到合适的位置插入以下代码: [[Image:20100318001.png|WordPress日志元数据]] 以上内容在大多数侧边栏的显示效果是: You are reading the article, [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags WordPress Makes ] [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags Me Smile], on our website, [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags Talking Blog]. This article was written on May 15, 2004, in Seattle, Washington, and you can find similar articles in the [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags WordPress] and [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags Blog] categories, or more articles by [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags Harriet Smith], if you enjoyed this article. If you have any comments about this article, you can contact Harriet Smith by [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags email], or leave a comment below. You can also follow comments made on this article via our [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags RSS 2.0] feed. If you would like to continue reading more, the previous article on our site is called [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags Things ] [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags To Do With WordPress] and the next article is called [http://codex.wordpress.org/Post_Meta_Data_Section#Adding_Template_Tags Why I Like WordPress]. Thank you for visiting our site. 这只是一个开始。我们还可以通过很多方式设计日志元数据:将元数据放入文本框,将元数据显示为正文的一部分,将元数据以列表形式显示....这完全取决于我们对日志元数据格式的构思,以及我们希望展现给读者的、关于日志的信息。
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)