WIKI使用導航
站長百科導航
站長專題
- 網(wǎng)站推廣
- 網(wǎng)站程序
- 網(wǎng)站賺錢
- 虛擬主機
- cPanel
- 網(wǎng)址導航專題
- 云計算
- 微博營銷
- 虛擬主機管理系統(tǒng)
- 開放平臺
- WIKI程序與應用
- 美國十大主機
WordPress: Fun Character Entities:修訂間差異
來自站長百科
Seadragon530(討論 | 貢獻) 無編輯摘要 |
無編輯摘要 ? |
||
第1行: | 第1行: | ||
=文字實體或者擴展文字= | =文字實體或者擴展文字= | ||
在許多WordPress站點上,你可以看到單個的符號有時突然出現(xiàn)。通常這些符號出現(xiàn)在導航連接上。舉個例子,看這個例子中的書名號'''(«)'''和'''(»)''': | 在許多WordPress站點上,你可以看到單個的符號有時突然出現(xiàn)。通常這些符號出現(xiàn)在導航連接上。舉個例子,看這個例子中的書名號'''(«)'''和'''(»)''': | ||
<div style="border:1px solid blue; width:50%; margin:20px; padding:20px">[[WordPress: | <div style="border:1px solid blue; width:50%; margin:20px; padding:20px">[[#WordPress:Character Entities or Extended Characters|« « Previous Post Title]] | [[#WordPress:Character Entities or Extended Characters|Next Post Title » » ]]</div> | ||
這些符號叫做'''[[WordPress:Glossary#HTML|HTML]] 文字實體'''或者叫做'''擴展文字'''.它們是通過一些網(wǎng)頁上看起來很奇怪的,瀏覽器認為是符號的代碼生成的。 ? | 這些符號叫做'''[[WordPress:Glossary#HTML|HTML]] 文字實體'''或者叫做'''擴展文字'''.它們是通過一些網(wǎng)頁上看起來很奇怪的,瀏覽器認為是符號的代碼生成的。 ? | ||
生成上述例子的代碼如下: | 生成上述例子的代碼如下: | ||
<pre><?php previous_post('&laquo; &laquo; %', '', 'yes'); ?> | <pre><?php previous_post('&laquo; &laquo; %', '', 'yes'); ?> | ||
| <?php next_post('% &raquo; &raquo; ', '', 'yes'); ?></pre> | | <?php next_post('% &raquo; &raquo; ', '', 'yes'); ?></pre> | ||
一些最流行的[[WordPress:Glossary#HTML|HTML]] ''文字實體''為: | 一些最流行的[[WordPress:Glossary#HTML|HTML]] ''文字實體''為: | ||
第38行: | 第25行: | ||
:<tt>&mdash;</tt> — long dash<br /> | :<tt>&mdash;</tt> — long dash<br /> | ||
</div> | </div> | ||
=在WordPress中使用文字實體= | =在WordPress中使用文字實體= | ||
使用''文字實體''是設計中一個有趣的部分!你可以在[[WordPress:Template Tags|模板標簽]]中使用這些特殊符號,如[[WordPress:Template Tags/the_category|<tt>the_category()</tt>]]標簽。注意:[[WordPress:Template Tags/the_category|<tt>the_category()</tt>]] [[WordPress:Template Tags|模板標簽]]列表,在[[WordPress:Post Meta Data Section|''文章meta數(shù)據(jù)'']] 部分,多種[[WordPress:Glossary#Category|分類]]指定為[[WordPress:Glossary#Post|文章]]。 | 使用''文字實體''是設計中一個有趣的部分!你可以在[[WordPress:Template Tags|模板標簽]]中使用這些特殊符號,如[[WordPress:Template Tags/the_category|<tt>the_category()</tt>]]標簽。注意:[[WordPress:Template Tags/the_category|<tt>the_category()</tt>]] [[WordPress:Template Tags|模板標簽]]列表,在[[WordPress:Post Meta Data Section|''文章meta數(shù)據(jù)'']] 部分,多種[[WordPress:Glossary#Category|分類]]指定為[[WordPress:Glossary#Post|文章]]。 | ||
在這個例子中,特殊的''文字實體''心形('''♥''')符號把WordPress, 電腦和網(wǎng)絡新聞 [[WordPress:Glossary#Category|分類]]分開來: | 在這個例子中,特殊的''文字實體''心形('''♥''')符號把WordPress, 電腦和網(wǎng)絡新聞 [[WordPress:Glossary#Category|分類]]分開來: | ||
第57行: | 第36行: | ||
<div style="font-size: 105%; color: blue; font-weight:bold; margin:20px; padding: 20px; border:solid 1px blue">WordPress ♥ Computers ♥ Internet News</div> | <div style="font-size: 105%; color: blue; font-weight:bold; margin:20px; padding: 20px; border:solid 1px blue">WordPress ♥ Computers ♥ Internet News</div> | ||
這個例子中你可以看到[[WordPress:Template Tags/the_title|文章標題]]中使用的其中一種符號: | |||
<pre><?php the_title('&#8734; ', ' &#8734;'); ?> </pre> | <pre><?php the_title('&#8734; ', ' &#8734;'); ?> </pre> | ||
<div style="font-size: 120%; color: blue; font-weight:bold; margin:20px; padding: 20px; border:solid 1px blue">∞ WordPress Makes Me Smile ∞</div> | <div style="font-size: 120%; color: blue; font-weight:bold; margin:20px; padding: 20px; border:solid 1px blue">∞ WordPress Makes Me Smile ∞</div> | ||
如果你想要把[[WordPress:Template Tags/the_author|文章作者]]高亮顯示,你不用在WordPress模板標簽中使用文字實體,你可以使用以下代碼: | 如果你想要把[[WordPress:Template Tags/the_author|文章作者]]高亮顯示,你不用在WordPress模板標簽中使用文字實體,你可以使用以下代碼: | ||
第80行: | 第47行: | ||
<div style="color: blue; font-weight:bold; margin:20px; padding: 20px; border:solid 1px blue">♦ Harriet Smith</div> | <div style="color: blue; font-weight:bold; margin:20px; padding: 20px; border:solid 1px blue">♦ Harriet Smith</div> | ||
如同你所看到的,在你的站點中有很多''文字實體''的使用。你可以實驗,然后找到更多創(chuàng)造性的方法來使用這些符號做好你的設計! | 如同你所看到的,在你的站點中有很多''文字實體''的使用。你可以實驗,然后找到更多創(chuàng)造性的方法來使用這些符號做好你的設計! | ||
::'''注意:'''不是所有的[[WordPress:Template_Tags|模板標簽]]可以使用''文字實體'',尤其是那些使用[[WordPress:Template_Tags/How_to_Pass_Tag_Parameters#Boolean|布爾參數(shù)]]的[[WordPress:Template_Tags|標簽]]。測試一個[[WordPress:Template_Tags|模板標簽]] '''thoroughly''',確認它可以接受這種符號。 | ::'''注意:'''不是所有的[[WordPress:Template_Tags|模板標簽]]可以使用''文字實體'',尤其是那些使用[[WordPress:Template_Tags/How_to_Pass_Tag_Parameters#Boolean|布爾參數(shù)]]的[[WordPress:Template_Tags|標簽]]。測試一個[[WordPress:Template_Tags|模板標簽]] '''thoroughly''',確認它可以接受這種符號。 | ||
==文字實體資源== | ==文字實體資源== |
2008年4月17日 (四) 15:41的最新版本
文字實體或者擴展文字[ ]
在許多WordPress站點上,你可以看到單個的符號有時突然出現(xiàn)。通常這些符號出現(xiàn)在導航連接上。舉個例子,看這個例子中的書名號(«)和(»):
這些符號叫做HTML 文字實體或者叫做擴展文字.它們是通過一些網(wǎng)頁上看起來很奇怪的,瀏覽器認為是符號的代碼生成的。
生成上述例子的代碼如下:
<?php previous_post('« « %', '', 'yes'); ?> | <?php next_post('% » » ', '', 'yes'); ?>
一些最流行的HTML 文字實體為:
- » » double right angle quote
- « « double left angle quote
- < < single left arrow
- > > single right arrow
- • • bullet
- ♥ or ♥ ♥ black heart
- ♦ or ♦ ♦ black diamond
- ♣ or ♣ ♣ black clubs (shamrock)
- ♠ or ♠ ♠ black spade
- ∞ ∞ infinity symbol
- — — long dash
在WordPress中使用文字實體[ ]
使用文字實體是設計中一個有趣的部分!你可以在模板標簽中使用這些特殊符號,如the_category()標簽。注意:the_category() 模板標簽列表,在文章meta數(shù)據(jù) 部分,多種分類指定為文章。
在這個例子中,特殊的文字實體心形(♥)符號把WordPress, 電腦和網(wǎng)絡新聞 分類分開來:
<?php the_category(' ♥ ') ?>
WordPress ♥ Computers ♥ Internet News
這個例子中你可以看到文章標題中使用的其中一種符號:
<?php the_title('∞ ', ' ∞'); ?>
∞ WordPress Makes Me Smile ∞
如果你想要把文章作者高亮顯示,你不用在WordPress模板標簽中使用文字實體,你可以使用以下代碼:
<div id="author">♦ <?php the_author(); ?></div>
♦ Harriet Smith
如同你所看到的,在你的站點中有很多文字實體的使用。你可以實驗,然后找到更多創(chuàng)造性的方法來使用這些符號做好你的設計!