WP Theme Lesson #7: Footer

tutorial-series.gif This lesson on the footer is simple. You’re going to add a DIV or invisible box under the Sidebar DIV and fill in some copyright text for the footer. Think you can do that without my instructions? Go ahead a try it. Come back to this lesson to double check.

Step 1: Add the DIV

Type the following codes under the Sidebar DIV:

<div id=”footer”>

</div>

add-footer.gif

Step 2: Add footer text within paragraph tags. For this, say anything you want. Here’s my message:

<p>
Copyright &#169; 2007 <?php bloginfo(’name’); ?>
</p>

add-footer-text.gif

Save notepad and refresh browser. Here’s the result:

footer.gif

If you didn’t use the footer text above, &#169; is the code for displaying the copyright sign. Also, remember the bloginfo() function that you used when putting the header together? I used it again for the footer. ‘name‘ calls for the blog’s title and ‘url‘ calls for the blog’s address.

If you want the blog’s title to be a link, check the header to remember how you did it.

Follow this WordPress Theme Tutorial Series from the beginning.

What's Next?
Related Posts

for an even better footer, do a php print date for the year. that way, no matter what year it is, it will always display the current year.
I’m not sure how the code will show up in the comments, so just wrap this code in php opening and closing tags:

print(date(Y));

now this was simple, i got to do the link in the footer from the header lesson, stuff getting into my head :D

dam lol i havent done this in a while - well i did it a few weeks ago to learn and screwed it up, time to relearn lol

Hamzeh:

you’re the man, your tutorial rocks big time

Thanks Hamzeh :)

[…] (wp_list_pages) #6c Get Archives and Links #6d Search Form and Calendar #6e Widgetizing Sidebar #7 Footer #8 How to Validate #9 Style.css and CSS Intro #10 hex Codes and Styling Links #11 Widths and Floats […]

Barry:

I use this for copyright dates:

So basically, in 2007 the date will be displayed as 2007. Next year it will change to 2007-2008 and so on.

If you’re updating a blog that started before this year, just change the dates in the code :-)

Instead of 2007 you can put

?php echo date(’Y'); ?

…and it’ll always be up to date.

Yes yes whatever you use would work.. I am doing it right now..

Copyright © 2007 Ehab’s Playground

Code used

Copyright © *print(date(Y));* *bloginfo(’name’); *

Replace the * with opening and closing php tags. You would know if you have been reading all this

This is a great tutorial, no, great ain’t even the word, it’s awesome!!! I’ve never understood php better.

Thanks man!!

The copyright with actual yr also works like this:

copyright © …

Once again, thnx so much. Time to check out the next lesson. It’s gonna be a long night

;)

b7x0:

Now that we’re in 2008, you can display your copyright like this: ie. 2006-2008

*print(’2006-’.date(Y));*

*=php tags

I think, I got it… now, I created many other files “header.php, sidebar.php, footer.php..” with theire code in theme and I call them with the function

[…] (wp_list_pages) #6c Get Archives and Links #6d Search Form and Calendar #6e Widgetizing Sidebar #7 Footer #8 How to Validate #9 Style.css and CSS Intro #10 hex Codes and Styling Links #11 Widths and Floats […]

Reply
Comment Policy
  • Theme support questions should be posted at the support forums.
  • Name and Email are required. Email is never published.
  • You grant this site perpetual license to reproduce your words and name/website in attribution.
  • Inappropriate comments will be removed at my discretion.
Close
Powered by ShareThis