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:
« « Previous Post Title | Next Post Title » »
These symbols are called 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:
<?php previous_post_link('« « %', '', 'yes'); ?> | <?php next_post_link('% » » ', '', 'yes'); ?>
Some of the most popular HTML character entities are:
|»||»||double right angle quote|
|«||«||double left angle quote|
|<||<||single left arrow (left angle bracket)|
|>||>||single right arrow (right angle bracket)|
|&# 9829; or ♥||♥||black heart|
|&# 9830; or ♦||♦||black diamond|
|&# 9827; or ♣||♣||black clubs (shamrock)|
|&# 9824; or ♠||♠||black spade|
|&# 8734;||∞||infinity symbol|
Note: Remove Space between “&#” and “9829” for black heart. Other symbols are the same.
Using Character Entities in WordPress
Using character entities can be a fun part of your design! You can use these special accents with template tags such as the the_category() tag. Note: the_category() template tag lists, in post meta data section, the various categories assigned to a post.
In this example, the special character entity, the heart (♥) symbol, separates the categories of WordPress, Computers, and Internet News:
<?php the_category(' ♥ ') ?>
WordPress ♥ Computers ♥ Internet News
In this example you see the use of an accent in your post’s title:
<?php the_title('∞ ', ' ∞'); ?>
∞ WordPress Makes Me Smile ∞
If you want to highlight the 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.
<div id="author">♦ <?php the_author(); ?></div>
♦ Harriet Smith
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 template tags can use character entities, especially those tags that use boolean parameters. Test a template tag
thoroughly to be sure that it will accept the symbols.
Was this article helpful? How could it be improved?
Log in to submit feedback. If you need support with something that wasn't covered by this article, please post your question in the support forums.