Tìm Hiểu về Wordpress - part 6 - Pdf 16

37
List values of custom taxonomy on a per-Post basis
This code is useful for displaying all of the terms associated with a particular
taxonomy for a given post. Simply place the following snippet where you would
like to display the comma-separated series of tag links:
<?php echo get_the_term_list($post->ID, 'people', 'People: ', ', ', ''); ?>
For each of your posts, the output of this particular example will display all of
the tags associated with the “people” taxonomy. You can change this up to any
taxonomy you want by editing the first instance of the term “people” in the
code. The last three parameters tell WordPress what to place before the tag links,
between each link, and after the tag links, respectively.
2.5.1 Users and Administrators
If you have installed WordPress, then you have set up at least one user. Each user is
basically an “account” on WordPress. When you go through WordPress installation,
you pick your own username and password. That username and password is one
user, but you are not limited to that. You can manually add new accounts, assign
privileges, and even enable visitors to register as users themselves.
Even if your theme doesn’t display
author names on the site itself, author
names are still used in the RSS feed.
Using a properly displayed name is
a nice touch when reading through
RSS. If you don’t want to use your
real name, even something like Site
Manager is nicer looking than the
default “admin.”
38
Neutering the Admin Account
Hey, thanks! Too much information?
WordPress tries to be as helpful as possible on its login screen. Like
any good web application, it tells you when you have an incorrect

One thing that you cannot ever change, once an account is created, is the
username. That means that the “admin” account will have a user name of “admin”
forever. We recommend not using this account as your regular account. Instead,
set up a new account for yourself right away, using a username that is more
memorable and specific to yourself, but of course with an extremely
secure password.
To do this, go to Users > Add New, fill out all the required fields, and be sure to
choose “Administrator” as your role. Then log out and back in again with your
brand new account. Now go back to Users > Authors & Users, hover over your
existing account, and click “Edit.” You will now enjoy some additional options that
weren’t available when you initially created the account.
With your new account, you can cosmetically change the look of the Admin area
by selecting a new color scheme. More importantly, you can change public-facing
details about your profile. We suggest changing your “Display Name” to something
more sightly, like your real name, for example. You can also edit your biographical
information, preferred URL, and other personal details. This information may then
be displayed on your web pages by calling the information from your theme files.
Old Themes
As you redesign your site over
the years, you should leave your
old themes in the wp-content
folder. It’s kinda fun sometimes
to go throwback. Maybe
your blog could dress up as a
previous version of itself for
Halloween.
40
2.6.1 Choosing the Perfect Theme
With everything that you will learn about WordPress from this book and
elsewhere, it is our hope that you will develop your own themes. Creating your

• WPBest - http://digwp.com/u/388
2.6.3 Previewing Themes
A lot of themes you find around the internet will be accompanied by a demo,
enabling you to see how the theme looks and works before you commit to
it. But even if the theme doesn’t have a demo, you can demo it yourself, on
your own blog. Upload it to your /wp-content/themes folder, and navigate to
the “Appearance” page of your Admin area. There, you find thumbnails and
descriptions of your site’s currently available themes. Locate the theme that you
would like to preview from among the crowd and click on its thumbnail. A popup
window will then show you what your site will look like when running that
particular theme. You can even click around and check things out without actually
activating it. Once you are satisfied and would like to use the theme, click on the
“Activate” link in the upper right-hand corner of the screen and you’re all set.
2.6.4 Key Things to Look For in a Theme
When choosing that perfect theme for your site, you want to focus on how it looks
and how it works. Does it rock your browser’s very existence? Does it deliver your
content on a silver platter for your visitors? Does it make you want to scream in
ecstasy and dance the jig? If so, then you know it’s the right theme for you. There
is no reason to settle for anything less than absolutely perfect, especially given
the vast menu of awesome themes available to you. If you find something close to
perfect that could use a little tweaking, remember that it is much easier to change
things like color and font size than the underlying structure and functionality.
That said, here are some key things to look for when searching for the ideal theme:
42
Navigation
Take a look at what the navigation is like on the theme. Then think about how
you picture the navigation working best on your site. Do categories need to be
prominently displayed? Are pages more important? Do you need a dropdown
menu system? Is there room for you to build your own navigation if needed? Does
it support the WordPress 3.0 menu system?

the more popular frameworks:
• Thematic (free) http://digwp.com/u/392
• Hybrid (free, with optional paid support) http://digwp.com/u/393
• Thesis ($87) http://digwp.com/u/394
Comes with source files?
It is likely that, even if you find a theme that you really like, you’ll want to be
doing some customization. If that involves modifying the theme’s images, it’s really
nice if the theme includes the source files from which it was created. These could
be Photoshop/Fireworks files, vector resources, icons, full-resolution images, etc.
Linkage
Flickr:
http://digwp.com/u/389

Google Analytics:
http://digwp.com/u/390

phpMyAdmin:
http://digwp.com/u/391
Of course we hope that you develop the chops
to build your own themes, but in a pinch,
services like WPCoder are great for turning
designs into real themes.
http://wpcoder.com
Drama
There was much web drama
related to the Thesis theme
creator and the WordPress
creators regarding Thesis
being not licensed under the
same (required) licence as

art direction in blog posts.
http://digwp.com/u/242
His blog isn’t powered by
WordPress, but interestingly
enough, Jason designed both
the WordPress Admin area
and the WordPress.org website.
You can do your own art
direction of individual posts by
being able to add custom CSS
to specic posts. Check out:
http://digwp.com/u/464
To the right you can see two
plugins in the list, one active,
one inactive.
45
of this direct web installation, your plugins directory must be “writeable” by
the server. In a perfect world, giving write permissions to a directory would
be absolutely safe, but in the hostile environment of today’s Web, you should
definitely consider carefully whether or not such permission is truly necessary.
The bonus of downloading plugins from the WordPress.org directory is that
you can be sure that the plugin isn’t malicious in any way. There are certainly
ways you can get yourself into trouble with plugins, but plugins obtained from
the Repository are unlikely to damage your site or harass your visitors. There
are plugins “out in the wild” available for download as well, but there are no
guarantees as to what you will get, so be very conscious of the source when
installing such plugins.
2.7.3 Dierence Between Disabling and Uninstalling
Disabling a once-active plugin prevents it from functioning, but does not physically
remove the plugin from your plugins directory. You could have a thousand

exists('get_poll') {
get_poll();
}
?>
46
2.7.4 Recommended Plugins
The nature of plugins is that they provide WordPress with supplemental
functionality that may not be needed by every site. Rather than try to squeeze a
million features into the WordPress core, application-specific functionality is left
to the awesome developers within the thriving WordPress community. Developers
see a need (or an opportunity), create a plugin, and release it to users. If the plugin
is popular enough, and makes sense to integrate into the WordPress core, the
wizards behind the curtain will see that it happens.
Even so, there remain a number of top-notch plugins that, for whatever reason,
have yet to be swallowed up by the core. Here are some of the best that we find
useful for virtually any type of WordPress-powered site:
Google XML Sitemaps http://digwp.com/u/23
This plugin will create a Google-compliant XML-Sitemap of your WordPress blog. It
supports all of the WordPress-generated pages as well as custom ones. Every time
you edit or create a post, your sitemap is updated and all major search engines that
support the sitemap protocol, like Google, MSN/Bing, Yahoo! and Ask.com, are
notified about the update. This is a super easy activate-it-and-forget-it plugin that
can help you by making sure search engines find every last corner of your site.
VaultPress http://vaultpress.com
VaultPress is a plugin and a paid service from Automattic, the creators of
WordPress. Once set up, your entire blog is backed up to "the cloud" including all
files on the server (WordPress itself, themes, plugins, images, etc) and the database.
They have a Premium level which includes scanning all those files for possible
security issues.


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status