站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Tag Templates
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
=== 显示图像链接到完整的文章=== Another thing that is interesting to do in a category archive page is to replace the post content with an image that links to your post. To do this, you will first need to put images into the Excerpt sections of your posts. Here's how to do that, for one post: 处理类别归档页面的另一个有趣的操作是使用链接到你的文章的图像代替文章内容。你首先要将图像放置到你的文章的摘录部分。下面是怎样将图像放到一篇文章的摘录部分: # Upload an image on the post editing screen. # Switch to the "Code" editor, rather than the "Visual" editor. # Use the Uploads / Browse tab to insert the image into your post. Make sure to insert the full-sized image, with no link. # Copy the inserted HTML <tt>img</tt> tag, and paste it into the "Optional Excerpt" section of the post editing screen. # Finish writing the post content (you can remove the image), and publish the post. #将一个图像上传到文章编辑界面。 #切换到"Code"编辑器,而不是"Visual"编辑器。 #使用上传/浏览标签将图像插入到你的文章。确定插入了完整大小的图像,没有链接。 #复制已插入的HTML<tt>img</tt>标签,并且将标签粘贴到文章编辑界面的"可选择的摘录" 部分。 #结束编写文章内容(你可以移除图像),并且发表文章。 Now you will need to modify your template. We'll use a trick: the [[WordPress:Template Tags/the_excerpt_rss|the_excerpt_rss()]] Template Tag does not put a paragraph tag around the excerpt. So we can use it to insert the <tt>img</tt> HTML and put it inside a link. Here's what you need to put into your Template, in place of using <tt>the_content</tt>: 现在你需要更改你的模板。我们会使用一种方法:[[WordPress:Template Tags/the_excerpt_rss|the_excerpt_rss()]]。模板标签没有将段落标签放置在摘录周围。因为我们使用模板标签插入<tt>img</tt> HTML并且将其放入链接内容。下面是我们需要放入模板中,取代<tt>the_content</tt>的内容: <pre> <a href="<?php the_permalink() ?>"> <?php the_excerpt_rss(); ?> </a> </pre> <pre> <a href="<?php the_permalink() ?>"> <?php the_excerpt_rss(); ?> </a> </pre> Caveat: using the excerpt this way '''may''' effect your RSS feed, because it places an img tag in the excerpt, instead of text. So if you are going to do this, you probably want to set your options so that the full posts are put in RSS feeds, rather than excerpts. 告诫:以这种方式处理摘录'''可能'''影响你的RSS feed,因为将img标签放入摘录而不是文本中。因此,如果你准备执行这个操作,你可能想要设置你的选项,这样完整的文章而不是摘录就会放入RSS feeds。
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)