WIKI使用導(dǎo)航
站長百科導(dǎo)航
站長專題
- 網(wǎng)站推廣
- 網(wǎng)站程序
- 網(wǎng)站賺錢
- 虛擬主機
- cPanel
- 網(wǎng)址導(dǎo)航專題
- 云計算
- 微博營銷
- 虛擬主機管理系統(tǒng)
- 開放平臺
- WIKI程序與應(yīng)用
- 美國十大主機
編輯“WordPress:Fun Character Entities”
該編輯可以被撤銷。 請檢查下面的對比以核實您想要撤銷的內(nèi)容,然后發(fā)布下面的更改以完成撤銷。
最后版本 | 您的文本 | ||
第1行: | 第1行: | ||
= | =Character Entities or Extended Characters= | ||
In many WordPress sites, you will see odd symbols that will pop up from time to time.? Often these symbols appear in navigation links.? For instance, look at the the double left angle quotes '''(«)''' and the double right angle quotes '''(»)''' in this example: | |||
<div style="border:1px solid blue; width:50%; margin:20px; padding:20px">[[ | <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> | ||
These symbols are called '''[[WordPress:Glossary#HTML|HTML]] character entities''' or '''extended characters'''. They are generated by strange looking code on the web page that the web browser interprets as symbols.? | |||
The code that generated the above example looks like this: | |||
<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> | ||
Some of the most popular [[WordPress:Glossary#HTML|HTML]] ''character entities'' are: | |||
<div style="font-size:110%"> | <div style="font-size:110%"> | ||
第26行: | 第26行: | ||
</div> | </div> | ||
= | =Using Character Entities in WordPress= | ||
Using ''character entities'' can be a fun part of your design!? You can use these special accents with [[WordPress:Template Tags|template tags]] such as the [[WordPress:Template Tags/the_category|<tt>the_category()</tt>]] tag.? Note:? [[WordPress:Template Tags/the_category|<tt>the_category()</tt>]] [[WordPress:Template Tags|template tag]] lists, in [[WordPress:Post Meta Data Section|''post meta data'']] section, the various [[WordPress:Glossary#Category|categories]] assigned to a [[WordPress:Glossary#Post|post]]. | |||
? | In this example, the special ''character entity'', the heart ('''♥''') symbol, separates the? [[WordPress:Glossary#Category|categories]] of WordPress, Computers, and Internet News: | ||
<pre><?php the_category(' &hearts; ') ?></pre> | <pre><?php the_category(' &hearts; ') ?></pre> | ||
第36行: | 第35行: | ||
<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> | ||
In this example you see the use of an accent in your [[WordPress:Template Tags/the_title|post's title]]: | |||
<pre><?php the_title('&#8734; ', ' &#8734;'); ?> </pre> | <pre><?php the_title('&#8734; ', ' &#8734;'); ?> </pre> | ||
第42行: | 第41行: | ||
<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> | ||
If you want to highlight the [[WordPress:Template Tags/the_author|post's author]], you don't have to use a character entity inside of a WordPress template tag.? You can use it in the text. | |||
<pre><div id="author">&diams; <?php the_author(); ?></div></pre> | <pre><div id="author">&diams; <?php the_author(); ?></div></pre> | ||
第48行: | 第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> | ||
As you have seen, there are a many uses for ''character entities'' within your site.? With this information you can experiment and find creative ways to use these symbols in your design! | |||
? | |||
::'''Note:''' Not all [[WordPress:Template_Tags|template tags]] can use ''character entities'', especially those [[WordPress:Template_Tags|tags]] that use [[WordPress:Template_Tags/How_to_Pass_Tag_Parameters#Boolean|boolean parameters]]. Test a [[WordPress:Template_Tags|template tag]] '''thoroughly''' to be sure that it will accept the symbols. | |||
== | ==Character Entities Resources== | ||
* [http://www.ascii.cl/htmlcodes.htm ASCII HTML | * [http://www.ascii.cl/htmlcodes.htm ASCII HTML Codes] | ||
* [http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/charsets/charsets.asp Microsoft Developer’s HTML | * [http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/charsets/charsets.asp Microsoft Developer’s HTML Character Sets] | ||
* [http://www.digital-web.com/articles/extended_ascii_characters_for_html/ | * [http://www.digital-web.com/articles/extended_ascii_characters_for_html/ Digital Web Magazine’s Extended ASCII Characters for HTML] | ||
* [http://www.utexas.edu/learn/html/spchar.html | * [http://www.utexas.edu/learn/html/spchar.html University of Texas - Special and Extended Characters] | ||
* [http://www.fjordaan.uklinux.net/moveabletype/fblog/archives/000063.html | * [http://www.fjordaan.uklinux.net/moveabletype/fblog/archives/000063.html Browser Support for Extended Characters] | ||
* [http://www.chami.com/tips/internet/050798I.html Chami’s | * [http://www.chami.com/tips/internet/050798I.html Chami’s Tips: HTML Special Character Reference] | ||
* [http://unicode.org/ | * [http://unicode.org/ The Unicode Consortium site] |