Information Technology Reference
In-Depth Information
15
That information is stored in the bloginfo() tag we discussed earlier. Table 15.3 shows you some
of the more common parameters. The form of the tag is <?php bloginfo('<parameter>'); ?> .
Table 15.3
Common bloginfo() Parameters
Parameter
Information
name
Blog title
description
Tagline
url
The web address (uniform resource locator) of your site
stylesheet_url
Where your CSS file ( style.css ) is located, as a URL
version
The WordPress version you're using
rss2_url
Where your RSS (Really Simple Syndication) feed is located, as a URL
stylesheet_directory
Where your theme is located
The Footer Template
Default footers are pretty boring, but they don't have to be. Most often, your visitors will see a link
to your theme developers (something you should never remove), a link to the RSS feed for your blog
pulled from bloginfo(rss2_url) , some site information, and maybe a link to the top of the page.
Some plug-ins even use the footer as a place to put content that appears elsewhere on the page.
Examining an Existing Plug-In
As we mentioned at the beginning of this chapter, WordPress itself is a PHP application, so it's
more than logical that additions to the core software are also written in this language. In the rest of
this chapter, we're going to look closely at a popular plug-in, FollowMe.
WP-FollowMe (just FollowMe going forward) is a simple plug-in that adds a badge to your site con-
nected to your Twitter account page. Clicking the FollowMe badge on your blog allows visitors to
see your recent tweets, and follow you if so inclined. Besides the basic functionality that we discuss
here, FollowMe lets you change the badge's default color of Twitter blue to something more com-
patible with your existing color scheme, and place the badge where you like.
FollowMe is available through the WordPress Plugin Directory, and
at the website of its creator, http://wpburn.com/wordpress-plug-
ins/wp-followme-plugin. Once you've installed it, you can use the
Plugin Editor to view and change the plug-in code.
From your Administration page, click Plugins to see your currently
installed plug-ins. Click the Edit link under FollowMe to open
the plug-in editor (see Figure 15.4). You can also open the file
wordpress\wp-content\plugins\WP-FollowMe\followme.
php in any text editor to view the code.
This file is not as well commented as it could be, but you can
clearly see what each section of the code is intended to do.
caution
Be sure that your plug-in is not
activated when you open it in
the editor. Any changes you
make could corrupt the work-
ing plug-in. This would likely
be disruptive for your visitors,
and could potentially bring
your whole blog down until it's
fixed.
Search WWH ::




Custom Search