Many of the answers provided on this FAQ refer to outdated versions of WordPress. Use caution when following some instructions, as some specifics may have changed. In particular, be wary of instructions that direct you to edit WordPress core files. We don't do things that way any more. The best way to alter how your website looks and works is by creating your own Child Theme that overrides only the settings you want to change and interacts only as needed with WordPress (just like a Plugin does) through action and filter hooks. Since all your customizations are contained in your Child Theme, you don't have to worry about all your changes being overwritten during the next upgrade cycle.
Layout and Styles
I am having trouble with my CSS so where can I find help?
The following are articles that will help you troubleshoot and solve many of your CSS problems:
How can I choose different styles or colours for my comments?
There are a variety of WordPress Plugins that change the look, layout, and colors of your comments and comment form. Look for various Comments Plugins in the Official WordPress Plugin Directory.
How do I change the size of the popup comments window?
To change the look of the Popup Comments window in WordPress version 1.5, make changes to the comment-functions.php file where it shows the following line: function comments_popup_script($width=400, $height=400, $file=) {.
To change the look of the Popup Comments window in WordPress version 1.2.1 Mingus, make the following change to the template-functions-comment.php on line 50:
function comments_popup_script($width=400, $height=400,
$file='wp-comments-popup.php')
You can also change Line 81 of wp-comments-popup.php to alter the textarea size for people entering comments.
Where can I find some other Themes and templates to use for styling my site?
Opening links in a new window is considered bad form in today's web as it has been abused. Yet, it still serves a purpose for demonstration sites that require more than one window open at a time. This method will work for those links that you enter into the body of a post.
After entering the link using the Quicktags button for "link", add target="_blank" to the individual*- link you want to have open in a new window when clicked. Consider adding text indicating that this link will open a new window, as required by web accessibility standards.
<a href="http://example.com/page.php"
title="Page Title - opens in new window" target="_blank">
Page Title (Opens in new window)</a>
Is there a tool to encode HTML entities and tags so I can display code on my site?
The article Writing Code in Your Posts will help you write programming code and code examples in your posts. The Encode tool will convert your HTML/XHTML code into a form that can be displayed on your blog without it being treated as HTML by browsers.
There are also WordPress [Plugins] and other tools available to help integrate this process into your site if you use it frequently to display code.
How do I do a dropcaps on the first letter of a post?
DropCaps is the name for the effect where the first letter of the first paragraph in an article drops below the line of text, and is displayed in a larger font-size than the other normal letters.
This can be done using BBCode quicktags. First, add this to your style sheet:
How do I show only the titles of articles on the site homepage?
To show only the title of posts on the site homepage, using the WordPress Default theme as an example, in the wp-content/themes/default/index.php file you will find code similar to this:
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
So, in this case, you would replace:
<?php the_content('Read the rest of this entry »'); ?>
with something like:
<?php
if (is_single()) {
the_content('Read the rest of this entry »');
}
else {//no content, nothing.
}
?>
This will cause only the post title to display on your homepage, but show the post content on the individual posts page. Note if your theme uses another template, such as single.php, to display individual posts, then this change may not affect your individual post pages.
How do I show an excerpt, teaser, or summary, for an article on the site homepage?
A teaser should not be confused with the excerpt. A teaser refers to the first few sentences or paragraphs of a post. When typing a long post, you can insert the <!--more--> Quicktag after a few sentences, and that acts as a cut-off point for the teaser. When the post is displayed on a home page, category page, or an archive page, the teaser is displayed, followed by a hyperlink (such as Read the rest of this entry...). Visitors can click on that link to see the full version of your post.
Note that some Themes may not support the more ability. Additional information on how to present the more can be found in the the_content() and Customizing the Read More articles.
As stated before, the teaser (the more) feature should not be confused with the Excerpt field that is completed when writing or editing a post. The Template Tag, the_excerpt(), can be used to display the post's excerpt field.
The excerpt you enter when writing a post will not be displayed on your site unless the_excerpt() template tag is specified in your theme. Also, if you choose the "Summary" option For each article in a feed in Administration > Settings > Reading, the excerpt will be used for feeds.
How do I show a summary rather than the full content of posts?
Here's two possible ways to show a summary, rather than full content of posts on a site main page:
Use the Quicktag <!--more--> in your posts, and it will display the text of the post up to that point, and then provide a link, such as "Continue reading...", to allow the reader to see the complete post. The article, Customizing the Read More, discusses changing the text (e.g. Continue reading...) of the link.
How do I use the blogroll links rating feature to display the ratings?
Go to the Links Panel.
Click on the Link you wish to feature in your blogroll.
Scroll to the bottom to Advanced and select the rating number for that site. The dropdown menu permits a rating of 0 - 10.
To get your link ratings to display, you may need to edit your Theme. See the documentation for the wp_list_bookmarks() or get_links() Template Tags for more information.
Images and Graphics
How to add a favicon to your site
To add a favicon to your site in WordPress 2.0 or later, place your favicon.ico file inside your theme folder (for example: wp-content/themes/default/) then add this line to header.php:
Buttons are like badges you display on your website to show your affection for something, or to display information regarding your cultural, social, political or technical leanings.
To add a WordPress button to your site showing support for the WordPress Community:
When using the default theme, you'll notice images (and links) do not appear when visiting category and archive query pages. This has to do with how the default theme displays post content in those sections of your site. To change this behavior, edit the default theme's Archive Template (archive.php). You can do this online through the Theme Editor, or offline by downloading and opening the default theme's archive.php in any text editor. Once in the Archive Template, look for this section:
<div class="entry">
<?php the_excerpt() ?>
</div>
Here, change the_excerpt() template tag, which displays a summary of a post's content while filtering out all HTML tags. To display each post's whole content (and HTML tags), use the_content() template tag:
How can I have the date/time displayed on every entry I make?
To put the date and time on every post title on your site, you may have to change more than one template file. They may include index.php, single.php, category.php, and archives.php.
From among the various template files, find all references to the title of your post like this (your Theme version may be slightly different):
<h2>
<a href="<?php the_permalink() ?>" rel="bookmark"
title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
<small>
<?php the_time('F jS, Y') ?> by <?php the_author() ?>
</small>
Rearrange it so the time information goes in front (or in back) of your Post Title:
<h2>
<a href="<?php the_permalink() ?>" rel="bookmark"
title="Permanent Link to <?php the_title(); ?>">
<?php the_time('F jS, Y') ?> - <?php the_title(); ?></a>
</h2>
<small>
by <?php the_author() ?>
</small>
How do I change the "Permanent Link to" in my Title link?
The title of your links includes text that explains what the link is to, in concordance with web accessibility standards. By default, your title may look like this example, which uses the title attribute with the words "Permanent Link to" and the template tag that displays the title of the post.
<h2>
<a href="<?php the_permalink() ?>" rel="bookmark"
title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
To change the "Permanent Link to" text, simply delete it and replace it with your own words:
How do I hide posts belonging to a certain category on the front page index.php?
If you need to hide (exclude) posts belonging to a certain category from displaying on the front page, you can place code that does the exclusion inside The Loop of your theme's index.php file.