Adding Other Content


Chapter 7 discusses some useful plugins for adding features to your server-installed WordPress blog. If there's no suitable plugin available for the content you want to add, you may be able to get the desired result by adding coding directly to your theme's files.

In this chapter we suggest some possibilities for extending your blog beyond what's possible with plugins. We show you how to display information about the blog's author, easily add distinctive images to posts from different authors, see statistics about the blog, use a favicon, and perhaps make a little money with Google AdSense. Since these tasks all require you to edit theme files, this chapter applies only to server-installed WordPress blogs and not to WordPress.com blogs.

In this chapter, we mainly show you how to add content to the sidebar, but of course, you're free to include it wherever you wish. Just remember, as explained in Chapter 6, any code you include inside The Loop will be attached to each post and may appear multiple times on one page. Code outside The Loop, or in the header, sidebar, or footer will appear only once per page.

Tips

  • Although most of the instructions in this chapter apply specifically to the Default WordPress theme, you can use similar or identical code in your own theme files to add the same features.

  • Whenever you edit your blog's theme files you run the risk of creating coding errors. To keep your blog running smoothly, validate your pages frequently. We explain how in Chapter 6.

  • Remember to always view your blog after saving changes to the files; even valid code may be incorrect.

  • In the examples in this chapter we show you how to add code directly to your theme files. Another way to do this is to put the code in a separate file and then include that file in the theme. We explain how to do this at the end of this chapter.

  • Most items in the Default theme's sidebar are part of a list; you should usually wrap sidebar items in list tags if you're using the Default theme.

  • Although this chapter suggests that you edit theme files in a text editor, you can also use WordPress's built-in theme editor. We explain how to modify theme files in Chapter 6.





WordPress 2. Visual QuickStart Guide
WordPress 2
ISBN: 0321450191
EAN: 2147483647
Year: 2004
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net