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 […]

[…] WP Theme Lesson #7: Footer Tutorial Series on WordPress from WPDesigner » wordpressgarage.com: […]

I really do like these tutorials, but what annoys me is this bit. Instead of wrapping the content in DIV tags and P tags you could just class the P tags..

Copyright Message

Gareth

Thanks a lot for this awesome tutorial. I have learnt a great deal from you.

Thanks for this amazing tutorial. I don’t know what I would have done without you.

[…] (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 […]

[…] WP Theme Lesson #7: Footer oleh Small Potato diterjemahkan oleh Mochammad […]

Jaysone:

Small Potatoe, You’re a legend!

[…] (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 […]

There is a problem with this code though:

what if the year is 2006? then it will read as 2006-2006 lol.

*SIGH* so much code to fix such a tiny problem…

Copyright © <a href=”">. All rights reserved.

damnit it ate my PHP code snippets. Isn’t there a

my code goes here

or

my code goes here

bbcode command or something?

There is a problem with this code though:

what if the year is 2006? then it will read as 2006-2006 lol.

*php
$site_launch_date = “2008″;
$site_current_date = date(Y);

if($site_launch_date == $site_current_date){
$site_date = “$site_current_date”;
} else {
$site_date = “$site_launch_date - $site_current_date”;
}
*

Copyright © *php echo $site_date; * *php bloginfo(’name’); *.
Diablo and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries. All rights reserved.

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