The footer is a much simpler deal….

footer.php

footer.php

  • © is the copyright logo
  • echo date('Y') – prints the year.
  • bloginfo('name') – will print the name of the site.

Now we move onto index.php. To start off with, if we just get the header and the footer just so that we can test that they work.

inserting the header and footer into the index

title bar and footer

As you can see from the last image, it would appear that the header and footer are working. In the titlebar is the blog title (highlighted in blue) and the footer (highlighted in orange) has worked as we can see the copyright notice.

`Now to work on the posts and the lovely ‘wordpress loop‘.

the loop

the loop

As you can see this is a very very basic loop. This should show all your pots with NO FORMATTING.

Let’s see if we can make the posts more distinguishable… Maybe give them a title and link to the post? An author? A category? We may as well give these elements some basic html too? Just so that they look a little better?

We will now use the following:

  • the_permalink() – gives the link to the post
  • the_title() – which gets the post title
  • the_author() – gets the author of the post
  • the_category() – gets the category the post is in.

It doesn’t matter what order these are arranged.

loop with basic html inserts

loop with basic html inserts

view of the rendering of index.php

view of the rendering of index.php

posted by author in category..

So now we can now ass the comments.

  • comments_popup_link() – this inserts a link to and counts how many comments there are about a post.
comments

comments

So far…… we have gone from a blank theme, to a theme with a header and footer….. to a page that has a very noticeable structure, a post title, a post author, a category, the post and any comments.