Thord Daniel Hedengren - Smashing WordPress_ Beyond the Blog-Wiley (2014)

(avery) #1

CHAPTER 9 • Using WordPress As a CMS 229


Figure 9-1: The Theme Customizer in action.


Granted, the Theme Customizer is simple enough and really doesn’t add anything that you
couldn’t do already, but it is easier to use than the regular Settings pages for some things.
Depending on the site, this could be a useful feature for your users.


UNBLOGGING WORDPRESS


Much of the functionality built in to WordPress may be overkill when you’re using it as a
CMS to power simple websites. A company website built around static pages containing
product information might not need comments or trackbacks, and the only kind of fluid
content might be a news or press clippings section. It just makes sense; some functionality just
isn’t needed, and neither is the blog lingo.


So when you need to build the kind of site that doesn’t require all the bling and the function-
ality, you won’t want to include all that in your theme. The following subsections outline a few
changes you should make when using WordPress as a CMS for an unbloggish site.


Template Files


You can stick to just one template file, index.php, for all your listing and search needs, but you
can chop this up into several templates if you want to. If you don’t need commenting func-
tionality, comment-related tags and code are completely unnecessary. Page templates, on the
other hand, are very useful. You can use page templates for various sections on your site, even
the front page, although you might be better off using the front-page.php template for that to
keep things simple.

Free download pdf