久久精品水蜜桃av综合天堂,久久精品丝袜高跟鞋,精品国产肉丝袜久久,国产一区二区三区色噜噜,黑人video粗暴亚裔
站長百科 | 數(shù)字化技能提升教程 數(shù)字化時代生存寶典
首頁
數(shù)字化百科
電子書
建站程序
開發(fā)
服務(wù)器
辦公軟件
開發(fā)教程
服務(wù)器教程
軟件使用教程
運營教程
熱門電子書
WordPress教程
寶塔面板教程
CSS教程
Shopify教程
導(dǎo)航
程序頻道
推廣頻道
網(wǎng)賺頻道
人物頻道
網(wǎng)站程序
網(wǎng)頁制作
云計算
服務(wù)器
CMS
論壇
網(wǎng)店
虛擬主機
cPanel
網(wǎng)址導(dǎo)航
WIKI使用導(dǎo)航
WIKI首頁
最新資訊
網(wǎng)站程序
站長人物
頁面分類
使用幫助
編輯測試
創(chuàng)建條目
網(wǎng)站地圖
站長百科導(dǎo)航
站長百科
主機偵探
IDCtalk云說
跨境電商導(dǎo)航
WordPress啦
站長專題
網(wǎng)站推廣
網(wǎng)站程序
網(wǎng)站賺錢
虛擬主機
cPanel
網(wǎng)址導(dǎo)航專題
云計算
微博營銷
虛擬主機管理系統(tǒng)
開放平臺
WIKI程序與應(yīng)用
美國十大主機
編輯“
WordPress:Tag Templates
”(章節(jié))
人物百科
|
營銷百科
|
網(wǎng)賺百科
|
站長工具
|
網(wǎng)站程序
|
域名主機
|
互聯(lián)網(wǎng)公司
|
分類索引
跳轉(zhuǎn)至:
導(dǎo)航
、?
搜索
警告:
您沒有登錄。如果您做出任意編輯,您的IP地址將會公開可見。如果您
登錄
或
創(chuàng)建
一個賬戶,您的編輯將歸屬于您的用戶名,且將享受其他好處。
反垃圾檢查。
不要
加入這個!
== 更改文章的顯示方式 == === Excerpts vs. Full Posts === === 摘錄 vs. 完整的文章 === Perhaps you are looking to cut down on the size of your Category pages. You could do this by displaying excerpts rather than the entire content of each Post. To do this, you will just need to find where it says <tt style="font-weight:bold; color:#036">[[WordPress:Template Tags/the_content|the_content()]]</tt> inside [[WordPress:The Loop]] in your Template, and replace it with <tt style="font-weight:bold; color:#036">[[WordPress:Template Tags/the_excerpt|the_excerpt()]]</tt>. These will most likely be inside PHP tags: <pre> <?php the_excerpt(); ?> and <?php the_content(); ?> </pre> 也許你想要更改你的類別頁面的大小。顯示摘錄而不是每篇文章的整個內(nèi)容,你就可以做到這一點。你只要在你的模板的[[WordPress:The Loop|The Loop]]內(nèi)找到顯示為<tt style="font-weight:bold; color:#036">[[WordPress:Template Tags/the_content|the_content()]]</tt>的位置,并將其更改為<tt style="font-weight:bold; color:#036">[[WordPress:Template Tags/the_excerpt|the_excerpt()]]</tt>,即可。這些很有可能在PHP標簽的內(nèi)部: <pre> <?php the_excerpt(); ?> 和 <?php the_content(); ?> </pre> Conversely, if your Theme is currently displaying excerpts and you want full posts, replace <tt>the_exerpt</tt> with <tt>the_content</tt>. 與此相反,如果你的主題當前顯示摘錄,但是你想要顯示完整的文章,將<tt>the_exerpt</tt>替換為<tt>the_content</tt>。 === Display Images Linking to Full Posts === === 顯示圖像鏈接到完整的文章=== 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: 處理類別歸檔頁面的另一個有趣的操作是使用鏈接到你的文章的圖像代替文章內(nèi)容。你首先要將圖像放置到你的文章的摘錄部分。下面是怎樣將圖像放到一篇文章的摘錄部分: # 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"編輯器。 #使用上傳/瀏覽標簽將圖像插入到你的文章。確定插入了完整大小的圖像,沒有鏈接。 #復(fù)制已插入的HTML<tt>img</tt>標簽,并且將標簽粘貼到文章編輯界面的"可選擇的摘錄" 部分。 #結(jié)束編寫文章內(nèi)容(你可以移除圖像),并且發(fā)表文章。 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>: 現(xiàn)在你需要更改你的模板。我們會使用一種方法:[[WordPress:Template Tags/the_excerpt_rss|the_excerpt_rss()]]。模板標簽沒有將段落標簽放置在摘錄周圍。因為我們使用模板標簽插入<tt>img</tt> HTML并且將其放入鏈接內(nèi)容。下面是我們需要放入模板中,取代<tt>the_content</tt>的內(nèi)容: <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標簽放入摘錄而不是文本中。因此,如果你準備執(zhí)行這個操作,你可能想要設(shè)置你的選項,這樣完整的文章而不是摘錄就會放入RSS feeds。 === What categories do you show to the visitors? === ===你想要向訪客顯示什么類別? === You can limit the categories in archive and other pages with this code: 你可以使用這個代碼在歸檔和其它頁面中限制類別: <pre> <?php query_posts('cat=1&showposts='.get_option('posts_per_page')); ?> </pre> <pre> <?php query_posts('cat=1&showposts='.get_option('posts_per_page')); ?> </pre> This is placed before the Loop. 這個代碼放置在Loop之前。 You find more info about the query_posts() function parameters here: http://codex.wordpress.org/User:JamesVL/query_posts . 你可以在這個網(wǎng)站找到更多的有關(guān)query_posts()函數(shù)參數(shù)的信息:http://codex.wordpress.org/User:JamesVL/query_posts 。 The <tt>get_option('posts_per_page')</tt> part of the code uses your blog's options to show a limited number of posts. 代碼的<tt>get_option('posts_per_page')</tt>部分使用你的博客選項顯示有限數(shù)目的文章。 This code is very useful if you would like to separate the categories. With this code you can make multiple archives. For example: 如果你想要分開類別,這個代碼非常有用。使用這個代碼,你可以創(chuàng)建多個歸檔。例如: <pre> <?php if (have_posts()) : ?> <?php if (is_month()) {query_posts('year='.get_the_time('Y').'&monthnum='.get_the_time('m').'&author_name=admin&cat=1&showposts='.get_option('posts_per_page')); ?> <!-- Do stuff... -> <?php } ?> <?php while (have_posts()) : the_post(); ?> <!-- post's contents --> <?php endwhile; ?> <?php endif; ?> </pre> <pre> <?php if (have_posts()) : ?> <?php if (is_month()) {query_posts('year='.get_the_time('Y').'&monthnum='.get_the_time('m').'&author_name=admin&cat=1&showposts='.get_option('posts_per_page')); ?> <!-- Do stuff... -> <?php } ?> <?php while (have_posts()) : the_post(); ?> <!-- post's contents --> <?php endwhile; ?> <?php endif; ?> </pre> If you use this code in <tt>archive.php</tt> and navigate to <tt>http://yourblog.com/2008/02/</tt>, show you the <tt>admin</tt> user's post that is posted on 2008.02. in the "first" category. 如果你在<tt>archive.php</tt>中使用這個代碼并且導(dǎo)航到<tt>http://yourblog.com/2008/02/</tt>,向你顯示<tt>admin</tt>用戶的文章,在2008.02發(fā)表,在"第一個"類別中。
摘要:
請注意,您對站長百科的所有貢獻都可能被其他貢獻者編輯,修改或刪除。如果您不希望您的文字被任意修改和再散布,請不要提交。
您同時也要向我們保證您所提交的內(nèi)容是您自己所作,或得自一個不受版權(quán)保護或相似自由的來源(參閱
Wordpress-mediawiki:版權(quán)
的細節(jié))。
未經(jīng)許可,請勿提交受版權(quán)保護的作品!
取消
編輯幫助
(在新窗口中打開)
取自“
http://kktzf.com.cn/wiki/WordPress:Tag_Templates
”