Last modified by MammaMia - 7 years ago
Less than a minute read

New Document

Developing a Colour Scheme

Modified 7 years ago by MammaMia
1 min read
When it comes to colour, there is a lot to think about as you develop or design your WordPress Theme . It's like painting a house. Which colour will cover the entire exterior? What colour do you want the door? Or the window trim? Accents and complementary colours or contrasting colours?
The colours that go into a website are not limited to the colour of the background and text. You have to consider all the colours used together. For example the links on your site can have three colour choices:
It's important to make sure everything is in harmony. Your header or masthead may be filled with colour while the rest of the site may be less colourful. Titles, headings, and lists, all can be in colour. And don't forget about the bullets on your lists - they are often coloured, too. With so many colour choices, finding a colour scheme or theme can be a challenge.
To help you pick your website colours, here is a list of colour tools and resources to get you started.

Colour Schemes

Colour Charts

Colour Pickers

Colour Blenders

Colour Gradient Generators

Colour Tools


First Steps With WordPress • Stepping Into Template Tags • Lessons: Designing Your WordPress Site • Template Tag Lessons • Lessons on WordPress Features and Functions • Template Lessons • WordPress Tech Lessons • Website Development Lessons • Validating a Website • Know Your Sources • WordPress Housekeeping • WordPress Site Maintenance • More WordPress Lessons

Designing Headers

Modified 9 years ago by MammaMia
13 min read

They say you can not judge a book by its cover, and yet every day people do. They pick up a book, look at the cover, and then are moved to either put it down, turn it over, or open it up just because of how the cover looks. Websites are also judged by their covers and the first impression often comes from the header.

The header of your site is typically the first thing people see. From this masthead or header art across the top of your page, people make sweeping judgements about what they are about to see and read. The same people who say you can not judge a book by its cover, also say that you only have 30 seconds to make a good impression. In the world of the Internet where the next web page is a click away, you have much less than that.

We are going to take you inside the architecture of a WordPress header and offer tips on how to customize it to become your own book cover, enticing people into your site with a good first impression. Then we will offer some tips from some experts on what makes a good website header.

The WordPress Header

By default, the WordPress header is a simple piece of code. You do not have to get into the code to change the header that comes with whatever WordPress Theme you choose. You set the blog or website title and description in the Administration > Settings > General panel, and WordPress does the rest.

In its simplest form, the WordPress Classic Theme features the header code like this in the wp-content/themes/classic/header.php template file:

<h1 >
<a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>

The header is set in an h1 HTML tag and features one template tag used with two different options or parameters. You can learn more about these parameters in the documentation for bloginfo() . Basically, the first one displays the URL of the website in a link, and the second one displays the name of the blog or website as set in the Administration > Settings > General panel. When the user moves the mouse over the header title, the header can be clicked to return back to the main or front page of the site as set in the Administration > Settings > General panel.

The WordPress Default Theme features an image in the background and presents the header like this in wp-content/themes/default/header.php:

<div >
<div >
<a href="<?php echo get_option('home'); ?>">
<?php bloginfo('name'); ?></a>
<div >
<?php bloginfo('description'); ?>
Award Winning Themes The Theme Headers showcased in this article are some of the award winners of the 2005 WordPress Themes Contest by Alex King .
The header of the Kubrick Theme

Again, the template tag featuring the name of the blog or website is in a link, but this shows another usage similar to the URL request above. It gets the same information, just in a different way. It also adds the description of the site from the Administration > Settings > General panel.

Basically, these two header examples do the same thing in different ways. They provide information in the header, with the potential for an image, and make the header title clickable to help navigation on the site. It is just a matter of how much information you want in your header, and how that information is displayed.

Using the first example from the Classic Theme, an image can still be used in the background, set within the style sheet in the h1 selector, but the second one gives more control to the use of an image in the header by giving it its own division. How these look are totally controlled by the style sheet.

Styling the Header

As listed in the two above examples, the styles for the header are contained within the h1, header, headerimg, and description CSS selectors. These are all found within the style.css, though may be found in the styles in the header.php of the Theme you are using. You will have to check both places.

In the Classic Theme, the CSS for the header are found in one selector, the #header.

#header {
background: #90a090;
border-bottom: double 3px #aba;
border-left: solid 1px #9a9;
border-right: solid 1px #565;
border-top: solid 1px #9a9;
font: italic normal 230% 'Times New Roman', Times, serif;
letter-spacing: 0.2em;
margin: 0;
padding: 15px 10px 15px 60px;

The background color is set to a green shade and there is a border all the way around the header which changes colors creating a recessed, shadow effect. The Times font is set with a size of 230% with a wider than normal letter spacing. The padding on the left side indents the text in from the left.

All of these can be easily changed, giving the border a thicker width and making it all the same color, changing the background color, the font size and style, the letter spacing, and more by modifying the information in each style attribute.

The same is true of the Default WordPress Theme header, except there are more styles to think about and they are found within the header.php's "head" tag and the style.css, though once you have your styles set, you can move the information into your style sheet.

The styles that control the header's look are found within the h1, header, headerimg, and description CSS selectors. Just like the Classic Theme, find these references and make your modifications there to change the look.

Changing the header image of the Default WordPress Theme has been simplified with the introduction of a utility called Kubrickr . It simply asks you to supply a new image file name for the header and then switches it for you, so you do not have to dig into the code. If all you want to change is the header image, this is an extremely useful and easy tool.

If you do want to get your hands into the code, dig into your header styles and make the changes. Below is a simple tutorial on changing just the header image manually.

Connections Theme Header

There are many different header images and header art available for you to use to change the image in the header. The styles for the header image for the Default or Kubrick WordPress Theme, and any Theme based upon that Theme, are more complicated to change than those for the Classic Theme. The styles are found within the styles in the header.php "head" section, as well as in the styles.css. To change only the header image reference, open the header.php template file and look for the styles like this:

#header {
background: url("<?php bloginfo('stylesheet_directory'); ?>/images/wc_header.jpg")
no-repeat bottom center; }
#headerimg {
margin: 7px 9px 0;
height: 192px;
width: 740px; }
NOTE: The use of the bloginfo tag only works when the style is used within the head of the template file. WordPress template tags will not work in the style sheet (style.css). To move this style to the style sheet, change the template tag to the actual address (URL) of the header image graphic.

To change the image file, replace the "kubrickheader.jpg" with the name of the new graphic image you have uploaded to your site to replace it. If it is in a different directory, change that by replacing the bloginfo() tag with the specific address of the graphic's location.

If you are using an image that is the same size, then simply replace the image. If it is a different size, fill in the height and width of the image in the next section called #headerimg. If you do not know, and are using Windows, view the folder in which the image resides on your computer in Thumbnail view mode. Click View > Thumbnail from the Windows Explorer menu. In Thumbnail view mode, find your image and hold the mouse over it. A small balloon tip will pop up listing the dimensions. Use that information in the styles. Otherwise, just right click on the image file and choose Properties and it should give you the file size and dimensions.

Save the template file and upload it and the image to your website and take a look . Some changes may need to be made to fine-tune the placement and look.

With the header image in place, it is time to tackle the rest of the header. Open your style.css style sheet file and look for the following:

Your Theme may or may not have all of these, but the Default Theme has all of them in different places within the style sheet. All or some of these may need to have the attributes changed to change the look of your header.

If you change the size of the header image or header art, be sure and change the other structural CSS selectors like content and sidebar to accommodate the change in the header size.

Red Train Theme Header

A header image that fits within the Default WordPress Theme is about 192 x 740 pixels. If you are replacing the header within any WordPress Theme, check the size of the header image and then find a replacement that matches that size. If you choose a header image that is smaller or wider or taller than the replacement, you may have to modify the other structural elements of the web page to allow for the change in size of the header.

If you are modifying the entire site's Theme, the width of the overall page or content area needs to be taken into consideration for the header image's size. The two most common screen sizes are 1024x768 and 800x600 pixels. Yet, wide screen monitors are gaining ground and web designers now need to prepare for screen widths of 1280x1024 and 1600x1200.

If you set your website to "float," positioned in the middle of the browser window with space on either side, then you can set your header width to whatever you want. If you are designing a Theme with a flexible or "elastic" screen width, then the width of your header becomes important.

If you are using a header image that can be repeated, and you are using elastic widths, you can set the styles within the header to repeat to fill the space:

#header { 
background: url("/images/kubrickheader.jpg")
repeat-x top left; }

This sets the header image to repeat horizontally beginning from the top left corner and going across. You can adjust these to whatever background position your header design and layout needs.

A new term growing in the web design field is header art. These are header images that are usually handmade using combinations of color, shapes, symbols, images, and text. They can take some time and labor to create. While there are some free header art sites , some sites sell their handmade header art. Although a photograph may be unique in its own way and convey the needed visual style, handmade header artwork is easier to match to other web page colors and is usually more aesthetically pleasing because of its distinctive nature.

Choosing pre-made header art has some benefits. The artists have already done the work and all you have to do is choose the design that best matches your website. And the graphic is ready to use, already sized and saved as a small file size.

Digital Westex's WordPress Header Art features a wide range of header art sized and ready for free download specifically for WordPress.

The best header art to use, if you do not want to generate your own, is any that bear the Creative Commons License that specifically allows its public use. Read the individual license for the image's use to make sure that you have permission to use the header art on your site. Usually you must attribute the author, share alike and not use it for commercial purposes. If in doubt, always ask permission from the author before use.

As header art is made and licensed "as is" by the designer/artist, some header art cannot be modified without the artist's permission. Check the website copyrights and licenses and ask if you are in doubt and wish to modify the artwork.

You can also design your own header art. Any graphic design software program will work. Popular ones include Adobe Photoshop, Adobe Elements, JASC PaintShop Pro, The Gimp and Macromedia Fireworks. The graphic design software should have the ability to resize and control the resolution and type of the image when saved. The size of your header art should be the size of the header container you're going to put it in.

You can use your own photographs, artwork, fonts, and any combination of images to create your header art. When done, save it "for the web" as a jpg, gif, or .png file. For an explanation on which to use read Sitepoint's GIF-JPG-PNG What's the Difference article. These file types will compress the image's resolution, reducing the file's size. In general, avoid file sizes larger than 50K as larger sizes tend to slow a site access times.

Fast Track Theme Header

Many Themes and Theme designers want to feature their header with a picture only, no text. Some will put the text in the graphic image, therefore not requiring the actual use of the text. One option is to remove the template tags that generate the title and description. The other option is to leave it in, but hide it.

To hide the header text while leaving it in the code, do not change anything in your template files. Only change the CSS. Add display:none to the CSS selectors you do not want to appear. For example, to hide the text within the h1 selector:

h1 {display:none; font-size: 230%; color: blue;.......

It is still there, but the browser has been commanded to not show it in any way. The container literally is "not there."

It might be hidden, but some web page screen readers and search engines will still find the information. If you are serious about making your site be accessible, some newer text readers access the style sheet and do not read the elements marked display:none. There are two popular methods for working around this. One is to use the display:none as outlined above, but also include an aural style sheet that changes that selector to display:block, "turning the visibility" back on. The other method is to position the content literally "off the page" by a negative indent. Here is an example:

h1 {
font-size: 0;
text-indent: -1000px; }

This technique moves the entire h1 tag and its contents physically off the web page. The screen reader will still "read" the text because it is there, but it will not display on the page. Extensive testing has proven so far that this technique works across most browsers and with all screen readers.

For more information on either technique and aural style sheets:

To make the entire header, graphic and all, clickable, you must put the header graphic inside of a link. There are two ways to do this. You can put the graphic directly into the WordPress Theme manually, or you can use the stylesheet to define the link size area to encompass the header art area.

To make the header art clickable by embedding it into the header, in the wp-content/themes/classic/header.php template file of your WordPress Theme, change the following:

<div >
<h1><a href="<?php bloginfo('url'); ?>/">
<?php bloginfo('name'); ?></a>

to this code snippet:

  <div >
<a href="<?php bloginfo('url'); ?>">
<img src="" alt="<?php bloginfo('name'); ?>" />
<h1><a href="<?php bloginfo('url'); ?>">" title="<?php bloginfo('name'); ?>">
<?php bloginfo('name'); ?></a>

You can style the h1 heading to overlap or sit below, or not even be visible in the header.

To make the overall area of the header clickable, the header must have a width area set for the h1 anchor HTML tag to make the clickable area cover the header image in the background. The styles are set in the stylesheet.

The HTML and WordPress Template Tags look like this, the same as above:

<pre><div >
<h1><a href="<?php bloginfo('url'); ?>/">
<?php bloginfo('name'); ?></a>

The CSS would then be styled something like this to enlarge the clickable link area and hide the header text (optional), customized to your own design needs.

#header h1 a {
width: 400px;
height: 100px;
display: block;
background: url(images/headerimage.gif) no-repeat top left;
#header h1 a span { display: none; }

Another option is to add a script to make the header section clickable, which may not work for all browsers. This is showcased in the Default WordPress Theme (Kubrick) with its clickable header:

<div  onclick="location.href='';" style="cursor: pointer;">

If you want both text areas of the header to be clickable and not the entire header image, use the following to make the header art and the blog title and description clickable.

<div >
<div >
<a href="<?php echo get_option('home'); ?>">
<?php bloginfo('name'); ?>
<div >
<a href="<?php echo get_option('home'); ?>">
<?php bloginfo('description'); ?>
Head Theme Header

There are several scripts available that will allow you to rotate images within the header, sidebar, or on any template file. We will examine the use of one of these, the Random Image Rotator .

Save the script to a separate folder in which you have the header images you wish to rotate in your header. For this example, call it rotate.php. To use this as a background image that changes or rotates with every load of the web page:

#header { 
background: url("/images/headerimgs/rotate.php")
no-repeat bottom center; }

To actually put this in your header, or elsewhere on your site, add an image link like this within the header division:

<img src="" alt="A Random Header Image" />

Image rotating scripts include:

RDC Theme Header

Headers are another area where you can add navigation elements to your website. Typically these are horizontal menus at the top or bottom of your header. To add these, create a new division within the header to style your header navigation elements.

This can be as simple as displaying your categories across the top of the header using one of the List Categories template tags . Let us look at one example using the list_cats() tag.

In this example, the list_cats() template tag is set to sort the list of categories by ID in an unordered list (<ul><li>) without dates or post counts, does not hide empty categories, uses category "description" for the title in the links, does not show the children of the parent categories, and excludes categories 1 and 33. It sits in its own "category" division. Notice that a link to the "home" page or front page has been included manually at the start of the list.

<div >
<div >
<a title="Home Page" href="index.php">HOME</a></li>
<?php list_cats(FALSE, '', 'ID', 'asc', '', TRUE, FALSE,
'', '', '1,33', TRUE); ?>
</div><!-- end of categorylist -->
<h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
</div><!-- end of header -->

To style this list, the #categorylist in the style.css might be:

#categorylist {font-size:12px; font-style:normal;
text-transform:uppercase; }
#categorylist ul {list-style-type: none; list-style-image:none;
margin:0; padding-bottom: 20px; }
#categorylist li { display: inline; padding: 0px 5px;}
#categorylist a:link, #category a:visited {color:blue}
#categorylist a:hover {color:red}

It might look like this:


You can also add your Pages , archives, and other links within your header navigation. For more information on navigation menus:

Header Tips

Here are some tips and information to help you choose and customize your WordPress site's header.

Header Resources and Information

Many WordPress Themes come with header image graphics you can use because they are released for free use under the GPL - General Public License . Or you can use one of the many resources available for free on the Internet, or design your own.

Here are a few resources for header images:


Customizing the Read More

Modified 9 years ago by MammaMia
7 min read

If you have set your WordPress site to display post excerpts on the front or home page, you will want visitors to click on the title or a link to encourage them to continue reading your post or article, right? WordPress makes this technique easy, and customizable.

The Excerpt Basics

Excerpts (teasers) can be shown on WordPress through two methods:

In both cases, if you have set anything in the Excerpt meta box on the post editor screen, that text will be used. Otherwise, the excerpt will be automatically trimmed.

The most commonly used method is the first one, because the user editing the post can choose between showing the whole content or just the excerpt, individually for each post. However, using the_excerpt() in your template file can also get a teaser from the first 55 words of the post content, without the need to place a more quicktag in the post.

To add a more quicktag in your post, put your cursor where you want to end the excerpted content of your post and click the more quicktag button.
quicktags are the little buttons found above the editing window in your Administration > Write > Post SubPanel. They include bold, italic, links, and others, and the famous more.

It will insert a code at that point that looks like this:

and I told him that he should get moving or I'd be
on him like a limpet. He looked at me with shock on
his face and said

The rest of the post continues, but when viewed on the non-single/non-permalink web page such as archives, categories, front page, and searches, the post is shown as an excerpt to the more point.

Users can then continue reading more as you have enticed them with your summary introduction, by clicking on a link to the full article. Themes usually include this link in the title and the above methods will generate it by default trailing your teaser, as the example below.

and I told him that he should get moving or I'd be on him like a limpet. He looked at me with shock on his face and said more...

Read More Techniques

The parameters within the template tag the_content() are as follows:

<?php the_content( $more_link_text , $strip_teaser ); ?> 

The $more_link_text sets the link text like "Read More". The second one, $strip_teaser, sets whether or not the "more" link should be hidden (TRUE) or displayed (FALSE). The default is FALSE, which shows the link text.

To remove the teaser:


By default, clicking the .more-link anchor opens the web document and scrolls the page to section of the document containing the named anchor (#more-000). This section is where writers choose to place the <!--more--> tag within a post type.

Users can prevent the scroll by filtering the content more link with a simple regular expression.

function remove_more_link_scroll( $link ) {
$link = preg_replace( '|#more-[0-9]+|', '', $link );
return $link;
add_filter( 'the_content_more_link', 'remove_more_link_scroll' );

Simply add the above code to the theme's functions.php file and the named anchors are no more.

Adding this code to your functions file enables you to customize the read more link text.

add_filter( 'the_content_more_link', 'modify_read_more_link' );
function modify_read_more_link() {
return '<a href="' . get_permalink() . '">Your Read More Link Text</a>';

Code reference:

Displaying a "more…" link when using the the_excerpt()

Sometimes you can't afford adding a more quicktag to all your posts, so the only way to show an excerpt is modifying the template, changing the_content() to the_excerpt() but that will just show "[...]" at the end, not a "more…" link to the full post.

To show a "more" link, add the following code to your functions.php file.

// Replaces the excerpt "more" text by a link
function new_excerpt_more($more) {
global $post;
return '<a href="'. get_permalink($post->ID) . '"> Read the full article...</a>';
add_filter('excerpt_more', 'new_excerpt_more');

If you are using a Child Theme , the above code will not work without modification if the parent theme has its own filters setting its own "more" link. You will need to use the remove_filter() function to remove the parent's filters for yours to work. The problem is your functions.php file is loaded before the parent's functions.php, so at the time of your file's execution, there is no filter to remove yet, and your remove_filter() code will fail without warning.

The key is to put your remove_filter() code in a function that executes from an action hook that triggers after the parent theme is loaded. The following code is an example of the additional code needed to get the above code to work from a child theme of the parent theme twentyeleven. You will need to examine your actual parent theme's code for the correct parameters in the remove_filter() code, they must exactly match the add_filter() parameters used by the parent.

function child_theme_setup() {
// override parent theme's 'more' text for excerpts
remove_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' );
remove_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );
add_action( 'after_setup_theme', 'child_theme_setup' );

Customizing the "more…" text

Seeing that you know how it works, now look at how we can make this little invitation to continue reading your post be more inviting.

By design, the the_content() template tag includes a parameter for setting the text to be displayed in the the "more…" link which allows you to continue reading.

By default, it looks like this:

and I told him that he should get moving or I'd be on him like a limpet. He looked at me with shock on his face and said more...

If you want to change the words from more.... to something else, just type in the new words into the tag:

<?php the_content('Read on...'); ?>

Or get more sophisticated and make it fun:

<?php the_content('...on the edge of your seat? Click
here to solve the mystery.'); ?>

You can style the text in the tag, too.

<?php the_content('<span >...on the edge of
your seat? Click here to solve the mystery.</span>'); ?>

Then set the moretext class in your style.css style sheet to whatever you want. Here is an example of the style which features bold, italic text that is slightly smaller than the default text:

and I told him that he should get moving or I'd be on him like a limpet. He looked at me with shock on his face and said ...On the Edge of Your Seat? Click Here to Solve the Mystery.

Some people do not want the text and prefer to use an extended character or HTML character entity to move the reader on to the full post.

<?php the_content('&raquo; &raquo; &raquo; &raquo;'); ?>

Would look like this:

and I told him that he should get moving or I'd be on him like a limpet. He looked at me with shock on his face and said » » » »

There is another parameter in the_content() template tag which will include the title of the post in the more text. Through the use of the_title() tag, the title of the article is included:

<?php the_content("...continue reading the story
called " . the_title('', '', false)); ?>
and I told him that he should get moving or I'd be on him like a limpet. He looked at me with shock on his face and said ...continue reading the story called A Tale That Must Be Told

Although the_content() is usually called from the template with a standard text as described above, it is possible to have an individual text for certain posts. In the visual editor, simply write <!--more Your custom text -->.

So, you may have something like this:

<!--more But wait, there's more! -->

The design possibilities with CSS are practically unlimited, and WordPress allows you to use images in many of their Template Tags , including the more tag. To add an image, there are two ways to do it. Begin with the most simple -- listing it in the_content() template tag.

This examples features the image of a leaf after the "Read More" text and assumes that the image file is within your theme's images folder.

<?php the_content('Read more...<img src="' . get_bloginfo('template_directory'). '/images/leaf.gif" alt="read more" title="Read more..." />'); ?>

Notice that the code uses an ALT and TITLE in the image tag. This is in compliance with accessibility and web standards, since the image is both an image and a link. Here is what it might look like.

and I told him that he should get moving or I'd be on him like a limpet. He looked at me with shock on his face and said Read More... leaf

You could even add a style to the image and more tag, as mentioned above, to style it even more. To use the image without the "Read More" text, just delete the text.

The second example uses the CSS background image. We have described how to use style classes in the above examples. This is a little tricker. The container's style must be set to allow the background image to show out from behind the text. If you were to use the above example as a background image, the style.css style sheet for this might look like this:

.moretext {
width: 100px;
height: 45px;
background:url(/images/leaf.gif) no-repeat right middle;
padding: 10px 50px 15px 5px}

The 50px padding against the right margin should make sure the text is pushed over away from the image as to not overlap it. The height ensures that the container will expand wide enough so the image is visible within the container, since a background image isn't "really there" and can not push against the container's borders. You may have to experiment with this to fit the size and shape of your own image.

You have gotten the basics. From here, it is up to your imagination.

Please remember that the "Read More" tag is used only on the Home page which shows the latest posts. It does not work in " Pages ". If you want to turn it on in Pages too for showing a set of partial posts, use the following code inside the loop for the dynamic content:

global $more;
$more = 0;
//The code must be inserted ahead of the call the_content, but AFTER the_post()
<?php the_content('Continue Reading'); ?>

It's important that if you're going to over-ride the default $more global variable you do it inside The Loop, but after your setup the post. If you're working with the standard Loop and using the_post(), make sure you set $more after the_post (but before the_content().

See More tag ignored on static front page forum topic.

If you set the $more variable to -1, the More tag will not be displayed. This can be useful in a "mullet loop". Like this:

<?php global $more; $more = -1; //declare and set $more before The Loop ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); //begin The Loop ?>
if ($more == -1) { //do not use the more tag on the first one.
$more = 0; //prevent this from happening again. use the more tag from now on.
else { //use the more tag
the_content(__('Read more...'));
<?php endwhile; //end of The Loop ?>

Creating Horizontal Menus

Modified 9 years ago by MammaMia
3 min read
Horizontal Menus are an excellent way to create a menu of categories or Pages, highlighting specific areas of interest within your website. Many web designers place a horizontal menu under the header, where they draw the eye.
Horizontal menus are created with the HTML List feature. Yes, while they are horizontal instead of vertical, like typical lists, they are still a list. CSS presentation styles allow us to set the list to run on one line instead of a separate line for each list item.
Since horizontal menus are simply lists in a horizontal line, let's start the process with a list.

Creating a Horizontal Menu

Below is the simple list for our horizontal menu. We recommend you keep your list small as too many will stretch wide across the screen and may cause some layout problems. We've enclosed the list in a division called navmenu.

<div >
<li><a href="<?php echo get_settings('home'); ?>">HOME</a></li>
<li><a href="wordpress/recipes/">RECIPES</a></li>
<li><a href="wordpress/travel/">TRAVEL</a></li>
<li><a href="">WORDPRESS</a></li>

As you can see, within our list we've included a PHP tag for the "home page" and several categories, as well as a link to WordPress, those helpful folks. The list would look like this, in its simplest form (as styled by the Codex):
You can also use the wp_list_categories() template tag to list your categories. If you just want categories 1, 3, 4, and 5 listed and the rest excluded, your list might look like this:

<div >
<li><a href="<?php echo get_settings('home'); ?>">HOME</a></li>
<?php wp_list_categories('orderby=name&include=1,3,4,5'); ?>
<li><a href="">WORDPRESS</a></li>

The place to put your new list might be just under the header. In WordPress v1.5, open the header.php file in the WordPress Theme folder you are using. Paste the code at the bottom of the file after the header DIV and then save the file.
In WordPress v1.2, open the index.php file and look for the end of the header section and place your list code there.
By default, a list runs vertically, each item on its own line. It also includes an image, known as a bullet, before each line. In your stylesheet, we need to add a reference to the navmenu and the first step is to remove the bullet and set our margins and padding to zero for the whole list.
#navmenu ul {margin: 0; padding: 0; 
list-style-type: none; list-style-image: none; }

If you save and upload your stylesheet, then refresh the test page in your web page browser, you would see that your list now has no bullets and no indents, if everything is working right.
Now, we need to add the technique that will set this list into a horizontal line. We need to add a style reference to the list item itself.
#navmenu ul {margin: 0; padding: 0; 
list-style-type: none; list-style-image: none; }
#navmenu li {display: inline; }

Because these are links, we have to take a moment to clean up the look of the links. There are many things you can do to style this list, but for now, let's add some space to the list of links so they aren't crowded together and remove the default link underline and have the link change colors when the mouse moves over it.
#navmenu ul {margin: 0; padding: 0; 
list-style-type: none; list-style-image: none; }
#navmenu li {display: inline; padding: 5px 20px 5px 20px}
#navmenu a {text-decoration:none; color: blue; }
#navmenu a:hover {color: purple; }

Okay, we can't resist. Let's take this another step further and give our new horizontal menu list some real jazz. See if you can tell what is being done to change the look.
#navmenu ul {margin: 0; padding: 0; 
list-style-type: none; list-style-image: none; }
#navmenu li {display: inline; }
#navmenu ul li a {text-decoration:none; margin: 4px;
padding: 5px 20px 5px 20px; color: blue;
background: pink;}
#navmenu ul li a:hover {color: purple;
background: yellow; }

If we did this all correctly, your list should look like this:

Without CSS

One should note that the all the above will fail in browsers with CSS turned off:
the <li> lists will still be formatted vertically, not horizontally.
Therefore, if one wishes to be portable to such browsers, one might use e.g.,

<p>Archives:<?php wp_get_archives('format=custom&show_post_count=1&type=yearly&after=;'); ?>
Categories:<?php echo str_replace('<br />',';', wp_list_categories('style=&show_count=1&echo=0'));?></p>

More Information on Horizontal Menus

There are many different ways to style lists. Use your imagination and come up with your own design, alternating colors, or whatever you want. Here are a few resources that will help you get started and learn more about Horizontal and other special effects menus:

Comments in WordPress

Modified 9 years ago by MammaMia
3 min read
posted comment.png

Comments allow your website's visitors to have a discussion with you and each other. When you activate comments on a Page or post, WordPress inserts several text boxes after your content where users can submit their comments. Once you approve a comment, it appears underneath your content. Whether you want to customize how your receive comments or tweak how your site displays comments, WordPress provides a thorough set of options to build a community from the visitors to your site.

Anatomy of a Comment

2011 comment form.png

Depending on your site's settings, comments display slightly differently from site to site. The basic comment form includes:

Once a visitor submits his or her comment, WordPress follows your preferences and either holds the comment for your approval or posts it immediately.

Discussion Settings

Before you enable comments on posts or Page , reviewing the options under Settings > Discussion can help make your life as a moderator easier. Settings > Discussion contains a list of options that change how WordPress processes comments. Experimenting with these settings can help you find a balance between restricting comments to reduce the amount of spam or less-relevant comments you receive and encouraging your users to actively participate on your site.

The settings under "Avatars" control the images your site displays next to comments. For an introduction to Gravatars, read the WordPress Lesson about How to Use Gravatars in WordPress .

Comment Spam

Because spam is pervasive on the Web, some of the comments you receive will most likely be spam. However, WordPress developers and administrators have already developed a number of successful strategies to help you prevent spam comments from appearing on your site. In addition to experimenting with different options in Settings > Discussion , you can install a WordPress Plugin like Akismet or make other changes to help you keep spam comments under control.

Enabling Comments on Your Site

Once you have decided on your discussion options, you are ready to enable comments. If you chose not to enable comments on all articles automatically, you can turn on comments for a specific post or Page in several ways.

discussion checked.png

After navigating to the editing screen for the post or Page you wish to add comments to, find the “Discussion” box and check “Allow Comments.” (If you do not see the “Discussion” box on the edit Page, click “Screen Options” in the upper right corner of the browser window. Make sure the box next to “Discussion” is checked.) Save your changes by clicking “Publish”, “Save Draft” or “Update."

quick edit link.png

Navigate to the Posts or Pages screen. In the list of Pages or posts, find the one you want and hover your cursor over the title of the post. You will see several links appear underneath the title. Click "Quick Edit" and check “Allow Comments.” Click “Update” to turn comments on for that post.

bulk action allow comments.png

From the Posts/Pages screen, check the boxes next to the posts or Pages on which you want to enable comments. Select "Edit" from the "Bulk Edit" Dropdown box and click Apply. Then, select "Allow" next in the Comments drowdown box and finish by clicking "update."

Managing Incoming Comments

recent comments dashboard.png

Once you start receiving comments on your site, you can check the status of comments quickly by looking at the dashboard, the admin bar, or the left navigation menu. When you log in, the dashboard's "Activity" box will show you the status of your comments. Hover over a comment to see your moderation options. From "Activity - Comments" you can approve, reply, edit, mark as spam, or trash comments. Alternatively, you can look to see if there is a number next to the comment bubble in the admin bar or "Comments" in the left navigation. This number represents how many pending comments require your attention.

WordPress makes moderating your users' comments a simple process. The Comments Screen lays out the basic information about each comment and lets you decide what to do with it.

The Comments screen is divided into three columns: Author, Comment and In Response To. Each of these columns provide you with a different category of information about a particular comment.

comment pending numbered smaller.png

bulk approve comments.png

Like the posts and Pages screens, the Comments screen supplies a Bulk Action dropdown box. Select the comments you want to edit, and then select Unapprove, Approve, Mark as Spam, or Move to Trash from the dropdown and click "Apply."

Supporting Resources

Was this information helpful?