0% found this document useful (0 votes)
151 views

Tao of WordPress - DEMO

This document provides an overview of WordPress and outlines its key concepts in 3 sentences or less: WordPress is an open source content management system that allows users to create and manage websites and blogs, with an introduction to its templating system, plugins, themes, and how to configure, secure, and optimize a WordPress site. The document covers topics such as installing WordPress, the WordPress dashboard, creating and managing posts, pages, comments and media, customizing appearance with themes and widgets, adding functionality with plugins, and best practices for security, backups, and performance. It provides a roadmap to learning WordPress and achieving "WordPress enlightenment" through understanding its templating hierarchy, core files, and

Uploaded by

Felipe RA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
151 views

Tao of WordPress - DEMO

This document provides an overview of WordPress and outlines its key concepts in 3 sentences or less: WordPress is an open source content management system that allows users to create and manage websites and blogs, with an introduction to its templating system, plugins, themes, and how to configure, secure, and optimize a WordPress site. The document covers topics such as installing WordPress, the WordPress dashboard, creating and managing posts, pages, comments and media, customizing appearance with themes and widgets, adding functionality with plugins, and best practices for security, backups, and performance. It provides a roadmap to learning WordPress and achieving "WordPress enlightenment" through understanding its templating hierarchy, core files, and

Uploaded by

Felipe RA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

“In the beginner’s mind there are many possibilities,

in the expert’s mind there are few.”


— shunryu suzuki
Contents

Welcome
1  The Way of WordPress
2  One way, many paths
3  Who should read this book
3  WordPress enlightenment
4  What you will learn
4  Skill requirements
5  About the book
Code examples
Free WP theme
Free updates
Feedback

6  Layout conventions
6  Getting help
7  Follow the path…
The Tao of WordPress

Preparation 24  Required files


The .htaccess file

9  A fork in the road.. The configuration file

10 Roadmap 27  Anatomy of a page visit

11  Required time 27 Checklist

12  Required software 28  Ready for action


Text/code editor
FTP software
Web browser
Installation
14  Domain name 31  The “famous 5-minute install”
15  Web hosting 32  Welcome to WordPress
Free hosting
33  The Toolbar
Shared hosting
33  Main Menu
Virtual private hosting
34  Screen Options & Help menus
Dedicated hosting
34  Welcome Message & Feature Pointers
Cloud hosting
Choosing the right host 35  First steps with WordPress
Preparing your server Publish a post
Leave a comment
22  The database
Customize widgets
Setting up a database and user with cPanel
Embed tweets and videos
Working with the database
36  Import and export content
37  Create a network of sites

iv
Table of Contents

37  Publish content via email 50 Posts

37  Publish content from your computer All Posts

38  Automatic updates 53  Add New Post / Edit Post


39  Manual updates Add Media
Visual or Code
39  Moving WordPress
Toggle Sidebar
40  Maintenance mode
Insert Links
40  Behind the scenes
Status & Visibility
Core files
Post Editor
/wp-content/
Media Content
/uploads/
Post Content
/wp-admin/ and /wp-includes/
59  Categories and Tags
Peripheral files
60  Media uploads
43 Backups!
Create and configure the uploads directory
44  Looking ahead
61  Upload New Media
62  Edit Media
Configuration 63  Media Library
64  Add Media
47  Login screen Create a Gallery
48  Lost password Set the Featured Image
48  User registration 66 Pages
49 Dashboard 67 Comments
50  Updates screen 68 Appearance

v
The Tao of WordPress

69  Install Themes


70 Widgets
Themes
71 Menus 93  What is a WordPress theme?
72  Custom Header 94  Endless possibilities
73  Custom Background 95  Brief history of themes
74 Plugins 95  Default WordPress themes
75  Add Plugins 96  Tao of WordPress theme
77 Users Tao Child theme
User Roles and Capabilities 97  Types of themes
79  Add New User 100  Where to find good themes
79  User Profile Free WordPress themes

80 Tools Premium WordPress themes

81 Settings 102  Choosing the best theme


General Settings Features

How to change the Site Address 104  Important things to check


83  Writing Settings 106  Installing & configuring themes
84  Reading Settings Manual installation
Automatic installation
85  Discussion Settings
Configuration
87  Media Settings
On the front-end
88  Permalink Settings
108  Understanding themes
89  Other Settings
109  Template Hierarchy
90  Next steps…

vi
Table of Contents

111  Inside template files


Inline comments
Plugins
Template tags 123  How plugins work
PHP code
124  Default WordPress plugins
HTML/markup
Akismet
The Loop
Hello Dolly
116  Key template files 126  Plugins vs. widgets
Header Template: header.php
127  Do you need a plugin?
Index Template: index.php
128  Choosing the best plugins
Sidebar Template: sidebar.php
130  Essential plugins
Comments Template: comments.php
133  Installing plugins
Custom Functions: functions.php
Manual installation
Single Post Template: single.php
Automatic installation
Page Template: page.php
Terminology
118  Child themes
134  Creating your own plugin
119  Customizing themes
136  Plugin configuration
120  Creating your own themes
136  Staying current
121  Coming up

vii
The Tao of WordPress

Tightening Security 153  Optimizing plugin security


All-in-one and forget it

139  Why security is important All-in-one plus monitoring & login security
Five focused plugins
140  Security is for everyone
Minimalist plugin combination
141  WordPress is secure.
154  Advanced security techniques
141  Security of themes & plugins
Blocking bad bots
142  First line of defense = common sense
Protect your site with a firewall or blacklist
143  Controlling access
Controlling proxy access
144  Hardening WordPress Protect comments-post.php
Disable version info
Prevent hotlinking
Delete install.php
162  Checking security of plugins & themes
Protect the configuration file
Use a plugin to check other plugins
Protect the admin directory
Use a plugin to check themes
Secure the uploads directory
Testing in debug mode
149  Improving security with plugins
164  Security lockdown
Login protection
166  More security help
Firewall
166 Onward..
File monitoring
Activity monitoring
Security scanning
“All-in-one” security
Honorable mention

viii
Table of Contents

Optimizing Improving SEO


Performance 197  Why SEO is important
198  First steps to better SEO
170  Optimization overview
Premium SEO tools
Establish a baseline
200  Key aspects of SEO
Factors to consider
On-site SEO
172  Optimizing the server
Social media & off-site SEO
173  Optimizing your site Quality linkage
General optimization techniques
Quality content
Caching techniques
Usability
File compression
Accessibility
179  Optimizing WordPress 206  SEO for WordPress
General optimization techniques
Search Engine Visibility
Optimizing the database
Enable permalinks
Caching with WordPress
Meta tags
185  Optimizing your theme Canonical links
Optimize images Robots.txt & humans.txt
Minimize HTTP requests Sitemaps
Minify, combine, and compress Clean up 404 errors
Use a Content Distribution Network (CDN) Keep an eye on traffic
Going further
215  Multipurpose SEO plugins
193  Resources for optimizing performance 216  Google and Bing
194  The path continues…
ix
The Tao of WordPress

217  On-page optimization 234  Using template tags


219  Monitoring SEO Example 1: Display a list of categories

221  Going further Example 2: Display a list of pages


Example 3: Display a navigational menu
221  Up next…
236  Customizing the Loop
239  Customize via functions.php
Customizing 240  Customize via Child themes

WordPress 241  Other ways to customize WordPress


246  One for the road…
223  What can be customized?
225 

225 
Stay on the path
Customize via plugin
Techniques
226  Customize via widget 250  Integrate social media
227  Customize via shortcode Social media sharing
Display a snippet of text Twitter
Display the current date Facebook
Display a link to the homepage Google
229  Customize by choosing a new theme Other social media services
229  Customize via theme settings 257  Serve mobile-friendly web pages
230  Customize via theme template files 259  Use WordPress outside of WordPress
Example 1: Changing fonts with CSS 260  Embed syndication feeds
Example 2: Create a custom page
Example 3: Customize the footer

x
Table of Contents

262 

265 
E-commerce & shopping carts
Forums & bulletin boards
Tips & Tricks
267  Galleries & slideshows 287  Tao of WordPress Theme
269  Lightboxes & sliders 288  Add a logo to the header
Lightboxes 289  Customize featured images
Sliders 290  Customize post formats
272  Set up a chat forum 291  Display read-more links
Styling the chat form
292  Add new widgets via child theme
Require login to view content
293  Integrating Contact Form 7
276  Enable visitors to submit content
294  Import files into the Media Library
Displaying uploaded images
295  Displaying audio and video
278  Customize the Dashboard
296  Autosave, revisions, and post locking
279  Customize the Toolbar
Autosave
280  Ajaxify WordPress Revisions
Ajax-powered comments
Post Locking
Ajax-powered contact forms
Customizing autosave and revisions
Ajax-powered login & registration
298  Infinite scrolling for posts
Ajax-powered search
299  Display blog posts on their own page
Ajax-powered themes

284  Continue the journey…


Articles and tutorials
Here’s to you!

xi
The Tao of WordPress

300  jQuery tricks for WordPress


Break out of frames
Open external links in new tab
Target all image links
Preload images
Clean up empty elements
Target iPod, iPhone, and iPad
Scroll internal links
Dynamic scroll to top link
Display a popup message
Clone any element and display it anywhere
Change text and HTML on the fly

307  Until next time..

Appendix
309  Getting help with WordPress
310 Troubleshooting

312  Monitoring and measuring


314  Fixing errors

xii
Table of Contents

About this Demo


This is a PDF demo of the book, The Tao of WordPress.
It contains the entire Table of Contents and the first
several pages of each chapter.

Note that, depending on the app used to view this


demo, hyperlinks may be disabled. In the complete
book, however, all hyperlinks are enabled in the Table of
Contents and throughout the book.

xiii
“Move and the way will open.”
— zen proverb
Welcome
In the philosophy of Taoism, the “Tao” refers to the “way” of the universe. 1 The Tao
is the experience of life, with all of its fullness, emptiness, and constant change. 2 To
live in harmony with the Tao is to “go with the flow” of nature, toward greater levels
of understanding, simplification, and efficiency. 3

You’re now on a journey that applies these fundamental principles to WordPress, a


The Chinese character 道 represents the Tao. powerful and flexible publishing platform for the Web.
Learn more @ https://wp-tao.com/2
Just as there is a way to write a book or build a skyscraper, there is a way to build
awesome websites with WordPress. The Tao of WordPress is understanding the
software and working in harmony with its native functionality. By simply going
with the flow of WordPress, the process of building, customizing, and managing
websites becomes an almost transparent, effortless process.

The Way of WordPress


WordPress has evolved from a humble blogging platform into a powerful and
flexible Content Management System (CMS). In early versions of the software,
working with code was integral to using and customizing WordPress. Now that
WordPress has matured (celebrating its 15th Anniversary in 2018), it’s possible to
create virtually anything — from simple blogs to networks of e-commerce sites —
without touching a drop of code.

Visit the official WordPress site for downloads,


themes, plugins, documentation and more.
1. About Taoism @ https://wp-tao.com/3
@ https://wordpress.org/
2. Tao and Taoism @ https://wp-tao.com/4
3. What is Tao? @ https://wp-tao.com/5

1
The Tao of WordPress

One way, many paths


Within the Tao of WordPress, there are infinitely many paths
for developers, designers and users to achieve their goals. Out of
the box, WordPress gives you a robust, dynamic platform that
may be customized and extended to create virtually anything:

•  Twitter/Tumblr-style blogs Perishable Press is proudly powered by WordPress.


•  Image galleries/portfolios @ https://perishablepress.com/
•  E-commerce/shopping sites
•  Forums and bulletin boards
•  Membership/download sites
•  …and everything in between 1

Even better, many types of sites can be designed and


customized from the comfort of the luxurious WP Admin Area,
where you have literally thousands of free plugins, themes, and
widgets at your fingertips. Need a forum? Install a plugin (or
Digging Into WordPress is also powered by WordPress.
several). Want a cool image-gallery? Install a theme and done. @ https://digwp.com/

From small blogs to integrated e-commerce sites, the vast


extensibility of WordPress makes building many projects an
efficient, “plug-n-play” event. And, best of all, WordPress is
open-source and 100% free.

1. More examples of awesome sites built with WordPress:


@ https://welovewp.com/
@ http://wpinspiration.com/ WP-Mix is a responsive, grid-based site powered by WordPress.
@ https://wordpress.org/showcase/ @ https://wp-mix.com/

2
Welcome : Who should read this book

Who should read this book


WordPress themes are sets of files that can This book is aimed at beginners seeking to learn the essentials of using,
change the look and feel of your site. They’re customizing, and extending WordPress. Additionally, the book serves as a useful,
covered in-depth in the Themes chapter.
practical guide for any proud owner of a WordPress-powered website.
WordPress plugins are sets of files that can
change or add new functionality of your site. While those new to WordPress will benefit from the book’s clear, concise
They’re covered in-depth in the Plugins chapter.
information, enthusiasts and experts will appreciate the elegant simplicity of the
presentation. It’s a clear signal focused on making the most of WordPress.

For beginners, students, enthusiasts, designers, developers, hobbyists, experts,


admins, and clients — The Tao of WordPress is the perfect guide for any WP user.

WordPress enlightenment
WordPress is a vast topic, with endless documentation, tutorials, tricks, and tips
available online, in books, podcasts, screencasts and slideshows. And it’s all available
to anyone — 24 hours a day, seven days a week, 365 days a year. 1

Unless you know where to begin and how to proceed, however, the endless ocean
of WordPress information can be overwhelming. But there’s no need to learn it all,
or even hire someone else to do it for you. All you need is WordPress, this book, and
your imagination. Once you begin, WordPress enlightenment is inevitable.

Getting started with WordPress is easy. Once you get to know the software and
its potential, what you do with it is entirely up to you. Whether it’s configuring
the default theme, customizing your own, or even creating advanced designs,
1. Official sources of WordPress information:
WordPress provides an efficient, flexible platform that makes it all possible.
@ https://wordpress.org/
@ https://wordpress.org/news/
@ https://planet.wordpress.org/

3
“Do, or do not. There is no try.”
— yoda
Preparation
Everyone needs a plan. Even if it’s a plan to do nothing, at least you know what’s
going on. When working with software, it’s a good idea to have an understanding of
what it does, how it works, and what’s involved. This chapter provides an overview
of the entire process, explains the required tools, and delivers a plan of action for
getting started with WordPress.

The Chinese phrase 成功 “Cheng Guon”


represents success and prosperity. A fork in the road..
As we begin our WordPress journey, we have a decision to make. The road ahead
forks into two paths. The first path leads to WordPress.com for a free WordPress
account. The second path leads to WordPress.org for a complete, self-hosted
installation of WordPress. Either of these paths lead to a free WordPress-powered
site, but there are some key differences to consider. Here is a quick summary:

• Web-based service that requires registration • Self-hosted WordPress on your own server
• Advertisements may appear on your site • No ads on your site (unless you put them there)
• Limited storage (paid upgrades available) • Unlimited storage (based on your hosting plan)
• Limited customization options, no plugins • Unlimited customization options, plugins, etc.
• Your site’s URL will be “whatever.wordpress.com” • Your site URL will be whatever you choose
• No access to files or database • Full access to files and database
• All updates performed by WordPress.com • You perform all updates of themes, plugins, and core files
• Get a free account @ https://WordPress.com/ • Download WordPress free @ https://WordPress.org/

5
The Tao of WordPress

If you choose WordPress.com, you’ll have a site set up immediately after


registration. Simply log in to customize your settings and begin adding content.
The features included with the free account are perfect for small sites and blogs, and
paid upgrades are available to do even more.

Or, if you choose WordPress.org, you’ll find a good web host, register your own
domain name, and host WordPress on your own server. Self-hosting means that you
have full control over every aspect of your site, including the database and all files.
Self-hosted WordPress unlocks its full potential.
Each account at WordPress.com provides a
user-dashboard with blogs, stats, and more.
So which path to choose? Signing up for a hosted account is fast, free and easy. If
you love it, great. Skip ahead in the book to the configuration chapter and continue
from there. Then, when you’re ready to take it to the next level with self-hosted
WordPress, you’ll benefit from any experience acquired using WordPress.com.

That said, the majority of this book is for self-hosted WordPress. From this point
WordPress.com is perfect for
forward, you’ll learn about every step of the process, from installation and small blogs, WordPress.org is
configuration to optimization and security. Before unlocking the full potential of perfect for any website.
WordPress, let’s “zoom out” for a quick overview of the road ahead.

Roadmap
Here is a general overview for creating websites with self-hosted WordPress:

1.  Find a good web host, set up your domain, and create a database
2.  Download WordPress, unzip the files and upload to your server
3.  Edit the WordPress configuration file with database credentials
4.  Install WordPress using its “famous 5-minute installation”
5.  Configure your site’s settings via the WP Admin Area

6
Preparation : Required time

Once WordPress is installed, your site is essentially ready to go. If one of the default
themes suits your needs, then you can jump right in and start adding content. Or, if
the default themes aren’t exactly what you had in mind, you can begin customizing
WordPress. From the comfort of the Admin Area, customizing WordPress is as easy
as trying new themes, installing plugins, and configuring widgets and settings.

If existing themes and plugins don’t get you there, you can venture further into
WordPress by creating and customizing your own. This involves working with code,
and enables you to create original designs with unique functionality.
‘Twenty Nineteen’ is the current default active
theme. It’s minimal, flexible, responsive, and
destined to be replaced by ‘Twenty Twenty’. Lastly, after configuring and customizing your site, you want to make sure that it’s
optimized and secure. These final steps are critical to running a healthy website, and
are covered in their own chapters later in the book. For now, let’s continue planning
with a quick look at the basic requirements.

Required time
WordPress claims a “famous 5-minute install” process, but there’s more to the story.
Before getting to the 5-minute installation, you need a domain name, web host (i.e.,
web server), and a database. With experience, these initial steps can go quicker, but
may require some quality time while learning the ropes.

If you’re new to WordPress, plan for a few hours to soak it all in, find good hosting,
register a domain name, configure the server, and set up the database. Then plan
for another hour to install, configure, and get to know WordPress. Again, with
For what it’s worth, it generally takes me about
experience it’s possible to streamline the process to require much less time. But
an hour to set up a fully configured, self-hosted it’s not a race. Take as much time as needed to understand your actions and make
WordPress site. From there, the amount of time the best decisions. By taking your time and doing it right, you establish a solid
spent customizing and adding plugins/themes
varies depending on the goals of the site.
foundation for creating and working with WordPress.

7
“Simplicity is the ultimate sophistication.”
— leonardo da vinci
Installation
Having met the requirements on our “pre-install” checklist from the previous
chapter, we’re now ready to install WordPress and watch the magic happen. For the
initiated, WordPress installation may be described simply as, “unzip/upload, edit
the wp-config.php file, and visit /wp-admin/install.php in your browser.” With
understanding and experience, installing WordPress can be that easy.

Yet, rather than end the chapter here, let’s walk through the installation process,1–2
explaining the details of each step. We’ll then take a tour of WordPress, go for a
quick test-drive, and look at some important administrative functionality. So now,
The Chinese word 和平 “Hépíng” represents for the moment you’ve been waiting for, it’s time to install WordPress.
tranquility, calmness, and peace.

The “famous 5-minute install”


Here are the steps required to install WordPress, with some key tips and tricks
presented along the way. Make sure you’ve met the requirements as explained in the
previous chapter before attempting to install WordPress.

Step 1. (Optional) Rename your /wordpress/ directory to something unique, like


“wp”. This is a security measure that helps to “hide” your WordPress files
from automated attacks. The more obscure the name, the better.

Step 2. Connect to your server using your FTP program and upload the entire
WordPress directory to the web-accessible root directory of your site. This is
Some web hosts offer “one-click” installations typically named “httpdocs”, “htdocs”, “home”, or similar.
of WordPress. This can save time, but it’s also
beneficial to understand what is happening
behind the scenes. Ask your host for details. 1. WP Codex: Installing WordPress @ https://wp-tao.com/545
2. WP Codex: Installation Techniques @ https://wp-tao.com/583

9
The Tao of WordPress

Step 3. Open your browser and enter the following URL in the address bar:
https://example.com/wordpress/wp-admin/install.php (note: replace Note: If you do not specify
“wordpress” with the name chosen in Step 1, and replace “example.com” a password, one will be
generated for you and
with your domain name). displayed on the “Success”
page. If you do not specify a
Step 4. Now on the WordPress installation page, fill in the required fields with username, WordPress will use
your information. For the username, it’s good practice to choose something the default name, “admin”.
other than “admin” to help secure your site against automated attacks. Also
remember to choose a strong password.

Step 5. Once you’ve completed the fields, click “Install WordPress” to make it so.
After WordPress is installed, you’ll see a “Success” page that displays your
username along with a “Log In” button.

If you made it to the “Success” page, congratulations, WordPress is now installed.


Click the “Log In” button to enter the Admin Area and begin using WordPress.
Otherwise, if something unexpected happens and you get stuck, visit the
Troubleshooting Guide in the Appendix for help.

Welcome to WordPress The installation “Success” page lets you know


that everything went according to plan. Click
Logged in to the Admin Area, you’ll notice the main menu to the left of the screen, the button to log in and start using WordPress.
and the WordPress Toolbar running along the top of the page. In the Admin Area,
you have control over many settings and options. Before getting into configuring
everything, let’s take a tour of the highlights of your new WordPress-powered site.

First let’s visit the public-facing side, or front-end of the site. An easy way to get
there is from the Toolbar at the top of any screen. Just hover over your site’s name
and click the link to “Visit Site”. When you visit the front-end, you’ll see the default
active theme, Twenty Nineteen. Take a few moments to surf around the front-end and To visit the front-end of your site, hover your
familiarize yourself with the theme’s appearance, features, and so forth. site’s name in the Toolbar and click “Visit Site”.

10
Installation : The Toolbar

Once you’ve seen the default theme, you may want to jump right in and begin
customizing. Before we get into themes, plugins, and the myriad ways to customize
WordPress, let’s return to the Admin Area and continue the tour.

The Toolbar
To return to the Admin Area from the public
An easy way to get to the Admin Area is via the Toolbar. As before, hover over your
side of your site, hover over your site’s name
and click “Dashboard” or other destination. site’s name and select your destination. The Toolbar makes it easy to jump back and
forth between the back-end and front-end of your site.

Note: The Toolbar is displayed Later in the book, we’ll learn how to customize the Toolbar with links and other
on the front-end only for users tools. For now, just know that it’s there to provide a more seamless experience with
who are logged-in to WP. Try
logging out and watch the WordPress, putting all the essentials within easy reach.
Toolbar disappear.
By default, the Toolbar is displayed across your entire site, on all pages on the
front-end and back-end. While there are plugins to disable the Toolbar site-wide,
WordPress itself only makes it possible to disable the Toolbar on the front-end. This
is done by visiting your Profile page in the Admin via Users > Your Profile, and then
unchecking the box to “Show Toolbar when viewing site”.

Main Menu
In the Admin Area on the left side of the screen is the WordPress main menu. The
main menu contains links to most of your site’s settings, plugins, themes, and
everything else. We’ll be going through the entire Admin Area in detail in the next
chapter. For now, take a quick jog through the menu items to see what’s available.

The main menu in the WordPress Admin Area Hint: to save screen space, you can click the “Collapse menu” button beneath the
provides links to just about everything. main menu, and then click again to restore the full-width menu.

11
“The object is not to make the tree
look like a bonsai, but to make the
bonsai look like a tree.”
— john naka
Configuration
At this point, having successfully installed WordPress, you are literally ready to rock.
In this chapter we’ll continue with a concise tour of the Admin Area, configuring
WordPress along the way. 99% of the configuration process is handled via the luxe
comfort of the Admin Area. The other 1% involves doing small tasks on the server.

Our configurational tour will coincide with the order in which settings and tools are
presented to users in the Admin Area. This will help to familiarize the reader with
WordPress, while configuring all available settings along the way. It’s a win-win.

“Configuration” is written as 組態 in
Traditional Chinese. Now you know.
As we get into configuring WordPress, we’ll see that the default WordPress
settings are optimal for most scenarios. In other cases, existing options may prove
insufficient for your specific needs. Whatever the case, we’ll optimize all settings
using the cleanest, most efficient methods possible. Along the way, we’ll see some
useful plugins and techniques to extend and enhance our WordPress-powered site.

Login screen
The Login screen is where registered users can log in to the Admin Area. It’s
available via either of these URLs:

•  https://example.com/wordpress/wp-login.php
•  https://example.com/wordpress/wp-admin/

For each of these URLs, replace “example.com” with your domain name, and
“wordpress” with the name of the installation directory. If WordPress is installed in
The WordPress login screen, where it all begins.
the root directory, the login page is located at https://example.com/wp-admin/.

13
The Tao of WordPress

Lost password
If any registered user (including the primary admin) forgets their password, a new
one may be requested by clicking “Lost your password?” from the Login screen. If
needed, the lost-password page is available at the following URL:

•  https://example.com/wordpress/wp-login.php?action=lostpassword

As always, edit the URL with your specific domain and WP directory. For more ways
to change or reset your password with WordPress, check out DigWP. 1

Enter your username or email address to


User registration retrieve your password. Easy peasy.

By default, WordPress disables registration for your site. If you look at the
screenshots of the login and password pages, you’ll notice there is no link to
“Register” for the site. As we’ll see later on, you can enable user-registration at any
time by visiting Settings > General, and checking the box, “Anyone can register”. When
registration is enabled, the login and password screens will display a link to the
registration page. You may also access it directly via its URL:

•  https://example.com/wordpress/wp-login.php?action=register

After a visitor registers with your site, they will be able to log in and customize
their profile and do whatever it is they are allowed to do, according to their default
User Role, which is set in the General > Settings as “New User Default Role”. For more
information, visit the Users section later in this chapter.

When registration is enabled, visitors will be


able to register for membership at your site.
1. Five Ways to Change Your WordPress Password @ https://wp-tao.com/61

14
Configuration : Dashboard

Dashboard
The WordPress Dashboard is the first thing you’ll see when logging in to WordPress.
It displays a variety of default widgets for recent comments, news, and much more.
As explained in the previous chapter, Screen Options are available to customize key
pages in the Admin Area. With just a few clicks, you can optimize the Dashboard
with tools and resources to help streamline your administrative process.

As of WordPress 3.8, the WP Dashboard has changed dramatically 1, and many


long-standing and useful features were suddenly removed without replacement.
This means that the default WP Dashboard is somewhat less useful than in previous
versions, but there are some ways to configure what’s left to better suit your needs.

For example, you can select which


dashboard widgets to display in the
Screen Options, and each displayed
widget may be toggled open and
Out of the box, the WP Dashboard is a mess.
closed by clicking on its title bar.
Perhaps most useful for organizing
the WP Dashboard is the ability to
rearrange the order in which the
widgets appear by simply grabbing
Example showing the “Activity” widget en route to
their title bars and moving them into its new location above the “Quick Draft” widget.
position (see screenshot at right).

Even better, it’s possible to create your own custom widgets for your WordPress
A few clicks later and the Dashboard is simple, site. You can include custom links, content — just about anything you can imagine.
refreshing, and ready for custom widgets.
Similar streamlining may be done using the Learn how in the Customize the Dashboard section of the Customization chapter.
Screen Options for many screens throughout
the Admin Area. 1. For example, the option to select single-column dashboard layout. For a fix see DigWP @ https://wp-tao.com/642

15
“It’s not that every snowflake is unique,
it’s that every everything is unique.”
— anonymous
Themes
If you’ve followed along with the book this far, your site is now ready for
customization via themes and plugins. In this chapter, the possibilities become
endless as we explore WordPress themes — what they are, how they work, where to
get them, and much more. In the next chapter, the path continues with plugins.

Unlike anything else, themes enable you to transform the appearance and
functionality of your entire site with a just a few clicks. Themes are the heart of
WordPress, enabling virtually anyone to create awesome websites. Whether you
want a simple blog or full-featured e-commerce site, themes can make it happen,
The Chinese characters 設計 mean to design,
usually for free, and with minimal effort. 1
layout, or plan.

What is a WordPress theme?


We’ve already seen that a WordPress site comprises a core set of files, a database,
and optionally an .htaccess file. Within the core files are numerous default
themes, including Twenty Seventeen and Twenty Nineteen. Every WordPress theme
consists of a set of folders and files that collectively change your site’s appearance
and functionality. All installed themes are located at /wp-content/themes/.

There are literally thousands of WordPress themes available on the Web, and many
of them are freely available from the WP Themes Directory. 2 Outside the Themes
Directory, there are free themes, premium themes, and everything in between. To
navigate the endless ocean of themes, understanding and strategy are essential.
The Tao of WordPress theme is minimal,
responsive, and perfect for learning WordPress.
Log in to the Members Area for FREE download. 1. WP Codex guide to using themes @ https://wp-tao.com/88
2. The WordPress Themes Directory @ https://wp-tao.com/89

17
The Tao of WordPress

Endless possibilities
The good news is that there are themes for virtually every occasion, business,
portfolio, personality, and style imaginable, and many of them are free. The not
so good news is that some themes are, well, not so good. And finding the good
ones can be a tedious process. Fortunately, this chapter brings eight years’ worth
of WordPress experience to help you understand and find the perfect theme.

WordPress themes range from simple to complex, free to expensive, and


minimal to “ultimate deluxe premium advanced”. Some themes, such as the Tao
of WordPress theme included with this book, are “starter” themes that facilitate
learning and promote customization. Other themes are more elaborate, feature-
rich, and luxurious. And then there’s everything in between. It’s really up to you.
‘Kubrick’, one of the first default WP themes.
@ https://wp-tao.com/90
Personally, I prefer simple themes that are focused on a particular type of site.
They tend to be less convoluted, bloated, and expensive than themes that try
to “do it all” with a zillion features. Certainly, there are some awesome deluxe
themes that will rock your website, but there are other factors to consider.

In general, the better the theme, the less code you have to touch. As we’ll see
later on, there are many ways to customize themes, such as the “Theme Options”
screen in the Admin Area, installing plugins, and editing code. Indeed, if you’re
comfortable with code, than any theme has the potential to be great. Or even
better, you can build your own theme to make everything exactly perfect.

Using this chapter as a guide, you’ll learn how themes work, how to customize
them, and how to find the perfect theme for your WordPress-powered site.

After Kubrick, there was ‘Twenty Ten’.


@ https://wp-tao.com/91

18
Themes : Brief history of themes

Brief history of themes


When I first got into WordPress, back in 2005, there were only a few hundred
themes available. In fact, I recall a blogger who had listed all of them in a post,
and for the next couple of years, actually managed to keep the list current. But
keeping track of the eventual explosion of WordPress themes proved to be an
impossible task. As WordPress’ popularity grew, so did the quantity and quality
of its themes, and virtually all of them were free, until around 2007.

After the boom of awesome, user-made, open-source WordPress themes, the


commercial market caught the scent. Swiftly, websites began selling “premium”
themes, which boasted more features and better support. For the next several
Here is a screenshot of the wildly colorful years, from around 2009 thru 2011, the premium theme market exploded,
‘Twenty Thirteen’ default theme.
@ https://wp-tao.com/92 leaving WordPress users with a growing abundance of incredible themes.

Since that time, WordPress themes have continued to multiply and evolve.
Better features. Responsiveness. Mobile themes. UX wizardry. In the premium
theme market, competition remains fierce. And that translates into better
themes and better deals for WordPress users. But navigating the vast ocean of
themes can be an overwhelming task, so let’s continue the journey with a look at
some of the themes that are immediately available to you.

Default WordPress themes


Included with the core files, in the /wp-content/themes/ directory, are
numerous themes, including Twenty Seventeen and Twenty Nineteen. These
default themes do a good job of utilizing native WordPress functionality. My
‘Twenty Sixteen’ is one of the three default recommendation is that, if one of the default themes works for you, use it.
themes currently included with WordPress. Continuing in the book, we’ll refer to the Tao of WordPress theme while learning
@ https://wp-tao.com/93
how to customize the appearance and functionality of any WordPress theme.

19
“It’s supposed to be automatic,
but actually you have to push this button.”
— john brunner
Plugins
Plugins enable you to extend WordPress’ built-in functionality to do almost
anything. With just a few clicks, you can integrate shopping carts, social
networking, bulletin boards, member forums, custom content, advertising,
slideshows, and so much more. Seriously, these days WordPress users enjoy a
wealth of free, awesome plugins that can do just about anything imaginable.

In this chapter, we’ll learn how plugins work, what to look for in a good plugin,
where to find plugins, and everything in between. We’ll also see how to diagnose
The Chinese characters 延長 mean to and resolve potential issues, and how to test your plugins for proper functionality.
expand, extend, or develop. Along the way, we’ll mention some of the most useful plugins, and check out a list of
the most essential plugins for any WordPress site.

Overall, this chapter is straightforward: find, install, and use the best plugins to
extend WordPress to do amazing new things.

How plugins work


Plugins provide a way to extend WordPress’ default functionality without modifying
any of its core files. Using the plugin API, 1 developers can hook into the WP core,
take advantage of existing functionality, and integrate their own custom scripts.
This extensible nature of WordPress has summoned over 24,000 plugins to the WP
Plugin Directory, 2 and many others elsewhere on the Web.
The WP Plugin Directory includes over 50,000
plugins. And they’re all available for automatic
installation from the Appearance screen in the
Admin Area. Or visit the WordPress.org and
download direct @ https://wp-tao.com/77 1. WP Plugin API @ https://wp-tao.com/152
2. WP Plugin Directory @ https://wp-tao.com/77

21
The Tao of WordPress

Default WordPress plugins


Out of the box, WordPress includes two default plugins: Akismet and Hello Dolly.
They are inactive by default, and may be deleted if they are not needed. Or, it’s also
perfectly fine to leave them installed, but inactive. Either way, let’s take a quick look
at each of these plugins and why they are included with WordPress.

Akismet

Far and away, Akismet is one of the best anti-spam plugins available. Once activated, After activating Akismet, it will display a
notice at the top of the page, explaining that
you’re prompted for your “Akismet API key”, which is available by signing up at the
the plugin is active but not enabled until you
plugin’s website. After obtaining your key, visit the “Akismet Configuration” screen enter you “Akismet API Key”. To do so, visit the
to enter it and choose a couple of basic options. “Akismet Configuration” screen, as seen below.

Once enabled, Akismet runs silently behind the scenes, checking comments and
blocking spam. You can check the spam bin at any time by clicking the “Spam” link
on the Comments screen. Occasionally, Akismet will miss a spam comment, or a
legitimate comment will get flagged as spam. Periodically, you may want to scan
through the spam bin and rescue any false positives, or “ham”.

After it’s collected some data, Akismet displays your “ham-vs-spam” statistics on the
“Akismet Stats” screen, available from the Dashboard menu. There you will find lush
charts and graphs displaying your comment statistics every which way.

After activating Akismet, a new link, “Akismet Stats”,


will appear in the Dashboard menu. Akismet provides
detailed reports about “spam” and “ham” comments.
Spam refers to illegitimate comments, and ham
refers to good comments that were rescued from the
spam bin. Learn more at DigWP.com:
@ https://wp-tao.com/153

22
Plugins : Default WordPress plugins

Hello Dolly

Also included with WordPress, the Hello Dolly plugin is much simpler. After
activating the plugin, a random line from Louis Armstrong’s unforgettable song,
“Hello Dolly”, is displayed in the upper-right corner of every page in the Admin Area.

This plugin, as far as I can remember, has always been included with WordPress, so
it holds a special significance, and even more so for Jazz enthusiasts. In the words of
WordPress-founder, Matt Mullenweg:

“This is not just a plugin, it symbolizes the hope


and enthusiasm of an entire generation…”

Hello Dolly also serves as a good example of the potential simplicity and elegance of
plugins. The plugin consists of a single PHP file that contains less than 100 lines of
code. This simplicity provides an opportunity to learn and see how plugins work.

Take a moment to open the Hello Dolly file in your code editor. It’s located at
/wp-content/plugins/hello.php. Then edit some of the quotes beginning on
around line 18 with some of your own. Finally, upload the plugin file and visit the
Admin Area to see the results. The quotes are random, but at some point, you’ll see
your custom quotes displayed right there in the Admin Area.

While tinkering with the hello.php file, locate “font-size: 11px;” and change it
to “font-size: 24px;”. Then upload the file and revisit the Admin Area, where you
should see the quotes displayed in a larger font-size. This is an example of how it’s
possible to change the appearance of WordPress by using a plugin.
While many plugins consist of numerous files
and hundreds or thousands of lines of code,
‘Hello Dolly’ consists of a mere 80-ish lines. Feel free to experiment further with the hello.php script. Learn from it, memorize
Shown here is the entirety of the plugin’s a few classic Armstrong quotes, and then either delete it or leave it enabled to keep
source code. An excellent learning tool.
the dream alive.
23
“Risk comes from not knowing what you’re doing.”
— warren buffett
Tightening Security
If your site is on the Web, it’s going to be attacked. That’s the grim reality. And even
more disconcerting is the fact that, if your site is online, there is no such thing as
perfect, 100% security. Anyone who says otherwise is lying. It is possible, however,
to protect your site against a large percentage of attacks, especially the automated
ones, which are by far the most common.

Using malicious scripts, criminals can scan thousands of sites for vulnerabilities
in minutes. If you examine your server logs, you will see the patterns of automated
The characters 安全 represent security.
scanning, it happens constantly. Picture legions of hungry animals looking for their
next meal, with your site as an “all you can eat” buffet, and you’ve got the idea.

In this chapter, we employ strong measures to secure our site against automated
scanning, spamming, and hacking. By applying layers of security to our sites, we can
protect against automated attacks, malicious exploits, and other nefarious activity.
A key principle here is that the more layers applied to a site, the greater its security.

Why security is important


This may seem obvious, but there’s more to it than keeping your own site online.
Infected websites compromise the entire server, which may host other sites, which
are then vulnerable to attack. On the Web, infected sites can infect visitors’ local
machines, which in turn spread the virus or payload further into cyberspace. And on
it goes, until much data, time, and money has been wasted.
WP Codex guide to hardening WordPress
@ https://wp-tao.com/169

25
The Tao of WordPress

Security is for everyone


On the Web, good security is about protecting those resources under your control.
For example, the server administrator is responsible for the security of the server
itself, its software, network settings, ports, and so forth. As the administrator
of your own site, you are responsible for the security of your database and files.
Likewise, any users registered with your site are responsible for using strong
passwords and participating according to the rules.

When everyone does their part, security is optimal; otherwise, vulnerabilities


emerge to be discovered and exploited. This is one reason why, in the Preparation
chapter, shared hosting is considered inferior to private hosting. On a private or
virtual private server, your resources are yours and not shared with other accounts.
In a shared environment, security is only as strong as the weakest link: if your
virtual neighbor’s site gets hacked, everything on the server is compromised and
vulnerable to attack.

Even so, taking steps to secure your site — regardless of where it’s hosted — helps
to ensure its existence, integrity, and potential success. A secure site provides a safe
environment for visitors to make transactions, upload content, leave comments,
and interact in general. People and search engines tend to prefer sites that are safe
and secure. When a site gets hacked, Google displays a scary warning message that
drives your traffic elsewhere. Insecure sites risk their reputation and rank in the
search results. Security provides a solid foundation for a thriving, growing site.

From large corporate and e-commerce sites to small portfolio sites and blogs,
security is mission-critical. Taking the time to protect the integrity of your resources
is well-worth the effort. Every security technique that you apply to your site adds
another layer of protection against threats and exploits. And it all begins by staying
current with WordPress.

26
Tightening Security : WordPress is secure.

WordPress is secure.
With all of this talk about malicious code and hacked websites, its easy to have
some concerns. But don’t worry. The previous section is meant to shed light on
the importance of good security, which WordPress takes very seriously. When
discovered, serious vulnerabilities are immediately patched, and a new, more secure
version of WordPress is released.

This is why it’s so important to keep WordPress, themes and plugins updated to
their current versions. Doing so ensures that you have all the latest improvements,
security patches, and bug fixes. Indeed, staying current with WordPress is the first,
best thing you can do to keep your site secure.

Security of themes & plugins


The WordPress development team maintains a sharp focus on security, so you
can run WordPress with peace of mind. If you’re running a default installation
of WordPress without any plugins, and using the default theme, your site is very
secure, even more so if you’re running the latest version. But then, if you install a
plugin that introduces a vulnerability, all of that tight WP security is for nothing,
and your site is no longer secure.

This is why, throughout the book, it’s recommended that you choose officially
approved plugins and themes from WordPress.org. Themes and plugins not
approved by the WP team may or may not be safe, which is why it’s important to do
your research before installing something from, say, WP-Scorpion.biz.

While there are risks, most plugins by trusted authors are well-coded and perfectly
safe. The point here is that plugins and themes should be carefully scrutinized
before installation and activation.

27
“Let your performance do the thinking.”
— h. jackson brown, jr.
Optimizing Performance
Websites should be as fast as possible. When your pages load quickly, your
visitors are happy, and happy visitors are the best. How quickly your pages load
depends on many factors, including some things you have control over, and
some things you don’t. For example, if your pages are loading slowly because of
limited server resources, there are steps that can help. Conversely, if your pages
are slow because of the visitor’s internet connection, there’s not a lot you can do.

Optimization is all about improving those things that can be improved, such
The characters 性能 represent performance. that you’ve done your part to ensure that your pages load quickly — regardless
of external circumstances. Improving the performance of your site helps to:

•  Conserve server resources


•  Improve visitor experience
•  Perform better with search engines
•  Increase traffic and sales
•  Improve site reputation

Bottom line: fast sites succeed on the Web. And this chapter shows you how to
make your WordPress-powered site blazing fast. Of course, there isn’t a magic
plugin that will optimize everything. Rather, optimizing performance is like
optimizing security: it happens in layers. Each new technique that you apply
WP Codex guide to optimizing performance further improves the performance of your site. Some techniques provide bigger
@ https://wp-tao.com/213
payoffs than others, and some are more difficult than others to implement, but
the end result is that any optimization steps you’ve taken work cumulatively to
make your site better, faster, and more awesome.

29
The Tao of WordPress

Optimization overview
Before getting into the optimization techniques, let’s take a moment to consider
some of the broader aspects of site-optimization. For example, it’ important to have
an understanding of how your site is performing before it’s been optimized. Using
free online tools, it’s possible to check key aspects of site performance, such as load-
time, page-size, number of HTTP requests, and more to establish a baseline.

google pagespeed – https://wp-tao.com/214


PageSpeed provides descriptive, actionable results about site performance.

yahoo’s yslow – https://wp-tao.com/215


YSlow requires installation of browser extension or bookmarklet, but the
practical, actionable results are well-worth the effort.

webpagetest.org – https://www.webpagetest.org/
Online tool for checking basic performance of web pages. Google’s PageSpeed is just plain awesome.
@ https://wp-tao.com/214
load impact – https://loadimpact.com/
Online tool that runs advanced load tests and more.

gtmetrix – https://gtmetrix.com/
Online tool that checks your site against both Google’s PageSpeed and
Yahoo’s YSlow performance recommendations.

pingdom – https://tools.pingdom.com/
Online tool that checks essential performance aspects of your site.

On their own, these tools can provide a LOT of information that can
Pingdom’s easy-to-use test results make it nice.
be overwhelming to the uninitiated. At first, focus on load-times and overall
@ https://tools.pingdom.com/
performance scores. Higher scores and lower load-times are the goal of this chapter.
As we go through the different techniques, the jargon and data presented for the
various online speed tests will begin to make sense.

30
Optimizing Performance : Optimization overview

Establish a baseline

To begin, test your site’s homepage using Google’s PageSpeed and see where it’s at
performance-wise. Use this score as a relative baseline for your site’s performance.
That way, as you implement optimization techniques, you can measure and
compare the results. After obtaining your baseline score, refresh the PageSpeed tool
and run the test again on Google’s own home page. The results of that test give us
something to aim for, as Google’s page performance is about as good as it gets.

Factors to consider
Google’s homepage @ https://google.com/ How you go about optimizing your site depends on numerous factors, such as
hosting, traffic, and the type and size of your site. Here is a quick overview:

hosting
The type of hosting you have determines the amount of control you have over the server.
Most of the optimization techniques and
recommendations are summarized neatly at For example, with shared hosting, the host manages the server, which means limited
the following two guides: control. Conversely, virtual/dedicated hosting provides control over most if not all
Google’s “PageSpeed Insights Rules” aspects of server configuration, providing much control over performance.
@ https://wp-tao.com/216
traffic
Yahoo’s “Exceptional Performance”
@ https://wp-tao.com/217 Traffic plays an important role in deciding how much optimization is necessary. For
example, small blogs with light traffic may be fine with existing performance levels,
whereas sites with heavier traffic will certainly want to boost performance. While
every site will benefit from better performance, in general, the extent of recommended
optimization is proportional to the site’s volume of traffic.

purpose
The type and size of your site should be kept in mind when optimizing your site. For
example, for large e-commerce sites, optimization is mission-critical. Likewise, sites
serving up lots of media content will benefit greatly from caching, and text-heavy sites
will benefit from compression. In general, most optimization techniques apply to every
site, but keeping the type of site in mind will help to make wise decisions.

31
“You have to learn the rules of the game.
And then you have to play better than anyone else.”
— albert einstein
Improving SEO
Ultimately, websites are for people. But people can only visit your site if they are
aware of its existence. The old saying, “build it and they will come” certainly applies
on the Web, but the amount and timing of traffic to your site depends on its online
visibility. The visibility of your site determines its success, and that’s what SEO is all
about: increasing the visibility and success of your website.

The Chinese character 勝 represents success SEO stands for “Search Engine Optimization”, but has evolved to represent much
or victory. May it be yours on the Web. more. Good SEO strives to optimize pages for both search engines and human
visitors. They are two sides of the same coin, each connected to the other. The more
that search engines like your content, the more it will be displayed in the search
results. In turn, the more that visitors like your content, the more it will be shared
around the Web via social media services, blog posts, and so on.

Going further, as search engines place more value on well-liked content, your pages
will continue to climb in the search results. The process is a self-perpetuating cycle
for sites that are well-optimized for search engines and people. In this chapter, we’ll
see how to optimize for both sides of the SEO coin.

Why SEO is important


SEO is proportional to the success of your website. If you are not concerned with
whether or not anyone visits your site, there is no real need for SEO. But most of
us are on the Web to succeed — whether it’s promoting, sharing, or selling, the
WP Codex guide to Search Engine Optimization
@ https://wp-tao.com/300 more traffic your site receives, the more successful it’s going to be. SEO is about
maximizing your online presence, reaping as many benefits as possible, and of
course making money. SEO is about growth, prosperity, and success on the Web.

33
The Tao of WordPress

First steps to better SEO


SEO advice is abundant on the Web. SEO is like the Wall Street of the Internet: it’s
where the action is for those wanting to score big, make millions, and take over
the world. Seriously, it can be exhausting trying to stay current with the perpetual
deluge of SEO info, but doing so keeps your game sharp and ahead of the curve.

So in this chapter on SEO, we’re going to keep it simple, efficient, and effective.
We’ll focus on the fundamentals, applying proven techniques and strategies to
improve the performance of our site with visitors, and with the search engines.

As with optimizing performance, the first thing we want to do for SEO is to see
where our site is at currently. A baseline for comparison purposes. Here are some
excellent free tools for checking the SEO of any site (some may require registration).

Seoptimer – Website review and SEO audit tool SiteCheckup – SEO made easy
@ https://www.seoptimer.com/ @ https://seositecheckup.com/

The Reaction Engine – Analyze the SEO for a given keyphrase Small SEO Tools – Nice collection of useful SEO tools
@ https://www.reactionengine.com/ @ https://smallseotools.com/

34
Improving SEO : First steps to better SEO

HubSpot – Generates marketing report for your pages Lipperhey – Analyzes the quality and ‘searchability’ of your site
@ https://website.grader.com/ @ https://www.lipperhey.com/

WebGnomes – Analyzes the SEO performance of your site UpCity – Analyze and compare site rank against competitors
@ https://wp-tao.com/617 @ https://wp-tao.com/618

WooRank – Website analysis with many great features Site Analyzer - Multi-criteria SEO analysis
@ https://www.woorank.com/ @ https://www.site-analyzer.com/

Premium SEO tools

Once you begin checking your site using these tools, you’ll see that there are many,
many ways to optimize your site for the search engines. Before continuing, take a
few minutes to check your site using one of the free SEO tools. Without worrying
about every little detail, keep the general results in mind so you know what to look
for as we continue with improving our site’s SEO.

35
“Stop thinking in terms of limitations
and start thinking in terms of possibilities.”
— terry josephson
Customizing WordPress
The act of customizing something makes it uniquely yours. For example, back in
high school, I customized my jean jacket with patches, buttons, and artwork. If
someone else saw that jacket, they knew it was mine. Likewise with websites, you
want to customize it to suit your needs and represent what it’s all about.

There are many ways to customize WordPress. WordPress may be customized


Customization is written as 定制 in via settings, themes, plugins, widgets, templates, and more. In this chapter, we’re
Traditional Chinese. going to jump right in and explain the many different ways and techniques that are
available to you for customizing WordPress. Then, in the next chapter, we’ll apply
our skills and implement some awesome techniques.

What can be customized?


So you’ve installed WordPress. And it looks just like every other default installation,
so you probably want to customize the site and really make it your own. But
where to begin? A WordPress-powered site brings a lot to the table, and it can be
overwhelming just looking at it all, wondering what can be customized, where to
begin, and how to make it happen.

With self-hosted WordPress, you literally have complete control over every aspect of
your site. If some aspect of WordPress’ default appearance or functionality needs
changed, it may be possible to do so via the settings in the Admin Area. If there are
no settings available that will make the desired changes, there may be a theme or
plugin that will do the job. And if all else fails, you have full control over the theme
C*U*S*T*O*M*I*Z*E
template itself, meaning you can make your site look and do whatever you want.
W*O*R*D*P*R*E*S*S

37
The Tao of WordPress

To put things into perspective, here is a general overview showing where to begin
with your customization efforts.

Method Things that can be customized Difficulty

Admin Area & default Basic functionality such as enabling/disabling comments, the number Easiest.
WordPress settings of posts to display, enabling/disabling registration, implementing
permalinks, etc.

Install & configure Everything under the sun, but some niches/functionality are hit or Easy to Advanced
themes/plugins miss. Plus, some plugins may require advanced configuration. (usually easy)

Configure theme Colors, font-sizes, positioning of sidebars, header images, background Easy.
options/widgets images, menus, widgets, colors, fonts, and potentially much more,
depending on the theme.

Customize theme Page structure (HTML), appearance (CSS), behavior (JavaScript), and Medium/Advanced
template files dynamic functionality (PHP). Essentially, anything is possible via (varies with theme)
template customization.

Edit some WordPress Literally any aspect of WordPress. As a rule, you should never change Never do this.
core files.. any core files. People get mad.

Keep in mind that these methods aren’t always mutually exclusive. The more
customization that needs to be done, the more likely it is that you’ll be configuring
settings, installing plugins, and customizing your theme files to make it happen.
The take-home message here is that there are numerous points of entry for getting
in there and customizing WordPress.

38
Customizing WordPress : Stay on the path

Stay on the path


When customizing your WordPress-powered site, use its native functionality
whenever possible. When default settings won’t suffice, see if you can customize
what’s needed by configuring settings in the Admin Area. Then, if that won’t get
you there, see if there’s a suitable theme or plugin that will do the job. Lastly, if the
Tip: Keep a log of any changes
desired customization isn’t possible through any of these methods, it’s time to pull
made to your site. A current
change log is useful for out the big guns and edit directly the theme (or child theme) template files.
diagnosing issues should
they arise. Version control is
“Staying on the path” is all about following this organic strategy when customizing
another way of doing keeping
track of changes (and much WordPress. Using native settings and functionality to make changes keeps things
more). Check out this recent manageable going forward. Over the years, WordPress has evolved to the point
article to learn more:
where most, if not all, required customization can be implemented without
@ https://wp-tao.com/354
touching any code. This enables you to make changes quickly and predictably, while
ensuring hassle-free updates and easier maintenance in the future.

With that in mind, let’s get into the different ways to customize WordPress. The
information contained in the next sections equip you with the knowledge needed
to implement just about any technique. We’ll then apply theses methods in the next
chapter with some popular and practical customization techniques.

Customize via plugin


As we’ve seen in the chapter on Plugins, there is a WordPress plugin for just about
everything. Using a plugin to customize WordPress enables you to keep things
modular and extensible.

For example, rather than hard-coding a shopping cart into your theme, using a good
e-commerce plugin means that somebody else has already done the work, so you can
get up and running in less time. Then, if later you decide that a shopping cart is not

39
“It is good to have an end to journey toward;
but it is the journey that matters, in the end.”
— ernest hemingway
Techniques
With a solid understanding of WordPress under the belt, it’s time to look at some
practical techniques for customizing your WordPress-powered site. There are
literally thousands of great customization techniques on the Web, but some are
more practical and popular than others. This chapter rounds up some of the most
frequently implemented modifications, plugins, tricks, and tips.

As you read through the chapter, each technique may or may not be useful for
you, however, following along will prove a useful exercise in furthering your
The Chinese characters 長壽 represent long understanding of how WordPress works. If anything, some of these techniques will
life, or longevity. May you have it abundance. spark new ideas for your own site. If you think of a technique that isn’t covered in
the book, search the Web to see if there are any good resources, tutorials, or plugins.
As we’ve seen, there’s a plugin for just about everything, and for everything else
there’s a custom function, plugin, or technique that will do the job. In most cases,
it’s just a matter of locating those who have “already been there and done that.”

Each of the techniques and plugins in this chapter includes a concise description
and walkthrough of the essential steps. Staying on the path of WordPress, each
technique strives to use existing functionality and as touch as little code as possible.
When modifications to the theme template or other files are required, remember to
make a backup copy before making any changes. Doing so makes it possible to “roll
back” to original condition should something go awry. Also, whenever possible, we’ll
refer to the Tao of WordPress theme to explain steps in the various techniques. 1

Implementing new techniques goes more


smoothly with your favorite beverage.

1. Log in to the Members Area to download the ‘Tao of WordPress’ theme (and child theme).

41
The Tao of WordPress

Integrate social media


As we’ve seen in the chapter on SEO, social media plays an important role in the
success and longevity of any website. Fortunately, there are literally thousands of
great plugins for integrating social media with WordPress. To help navigate the Sociable Media Feather delivers a clean set of
ocean of possibilities, here is a hand-picked guide to the best of the best social media social-media “share” and “follow” buttons.
plugins for WordPress.

Social media sharing

Make it easy for visitors to share your content by adding a set of “share” buttons on
your posts, pages, sidebar, and anywhere else. Here the best plugins that I’ve found
for doing so. They are all top rated and provide excellent features.

Flare makes sharing fun again.


social media feather – https://wp-tao.com/400
Social Media Feather provides a lightweight set of social-media buttons that can be
displayed on all Posts, Pages, and Custom Post Types. The buttons link to your specified
social-media profiles, making it easy for your guests to share content and follow your
activity. Features include sharing widgets and shortcodes to further expose your social-
media presence. As a bonus, you can disable buttons on any post via Custom Field.

flare – https://wp-tao.com/401 Simple Share Buttons Adder is clean & focused.


Flare is a newer plugin that puts a new spin on social sharing. In addition to displaying
share buttons and their respective counts, Flare combines the counts into a total
number of “flares”, which is then displayed alongside the share buttons on your posts
and pages (see second screenshot at right). Flare features a clean, user-friendly settings
screen and plenty of useful features.

simple share buttons adder – https://wp-tao.com/402


This is a simple, clean, lightweight plugin that displays share buttons on all of your posts
and/or pages. Features enable you to customize location, text, icons, and more. Simple, Ultimate Social Media and Share Icons provides
a wealth of options, including a nice variety of
elegant, and effective. I’m thinking that “adder” refers to an action rather the snake.
button styles.

42
Techniques : Integrate social media

ultimate social media and share icons – https://wp-tao.com/651


Ultimate Social Media and Share Icons makes it easy to display icons for feeds, email,
Twitter, Google+, Facebook, LinkedIn, YouTube, and around 200 other popular services.
Includes many great features like multiple actions, animations, click-counts, pop-ups,
and custom icon uploads, so you can choose your own flavors.

social crowd – https://wp-tao.com/403


Social Crowd entices visitors to follow and connect by displaying the number of friends
and followers from your favorite social networks. Currently the plugin only supports
Facebook, Twitter, YouTube, and Vimeo, but enables customization of each, including
Social Crowd entices visitors to connect on
Facebook, Twitter, and others by displaying update intervals and alternate icons.
your follower count for each.
For more social media sharing plugins and tools, check out the article, Social Media
Plugins for WordPress at Smashing Magazine’s WordPress section. 1

Twitter

Twitter is the place to share your content in real-time, get instant feedback, and
connect with others. Integrating Twitter with your site involves techniques such as
auto-tweeting your posts, including tweets in post comments, and displaying your
recent tweets in the sidebar. To do so, here are three plugins worth checking out.

tweetily – https://wp-tao.com/405
Tweetily is a set-and-forget plugin that makes it easy to share all of your new posts with
your Twitter followers. Features include easy connection to your Twitter account, next-
tweet countdown, hashtag focusing, and much more.

Tweetily automatically tweets your new posts. twitter mentions as comments – https://wp-tao.com/406
This plugin “scours Twitter for people talking about your site and silently inserts their
Tweets alongside your existing comments.” Even cooler than that, tweets are handled
1. Social Media Plugins for WordPress like regular comments, so you can manage them from the Comments Screen. Too many
@ https://wp-tao.com/404 awesome features to name here, so definitely worth a look.

43
“Variety is the very spice of life,
that gives it all its flavor.”
— william cowper
Tips & Tricks
As a way of saying “thank you” to everyone who purchases The Tao of WordPress, here
is an exclusive bonus chapter with more useful tips and tricks for customizing your
WordPress-powered site. This chapter draws upon the principles and techniques
covered in previous chapters and applies them to the art of customizing WordPress
via theme templates, shortcodes, and jQuery. Using a minimal amount of code, it’s
possible to add new functionality and fine-tune the look and feel of your site.

In general, implementing changes to your site is best achieved using plugins.


The phrase “Xièxiè” means “thank you” and is It’s easy to find good plugins for general stuff like sitemaps and contact forms,
written as 謝謝 in Chinese. but not so much for site-specific details such as changing the width of posts or
adding a second loop. These sorts of case-specific modifications are best handled
at the theme level, where targeted customization may be executed precisely and
efficiently. This chapter presents some practical customization techniques that
demonstrate the ease with which changes can be made via theme template files.
Additionally, this chapter contains some tips and tricks for working with media
files, post revisions, post locking, autosave, and the jQuery JavaScript library.

Tao of WordPress Theme


There are gazillions of themes out there, so rather than try to generalize and
complicate things, we’ll use the Tao of WordPress theme (and its child theme) 1 to
keep the techniques as focused and simple as possible. For each technique, the code
will work with any WordPress-powered site, but the implementation may vary
“Make tea, not war.” — Monty Python
depending on the theme. And with that said, it’s time for some tips and tricks.

1. Log in to the Members Area to download the ‘Tao of WordPress’ theme (and child theme).

45
The Tao of WordPress

Add a logo to the header


As explained in the section on custom headers, supportive themes enable users to
change the header background image directly from the Admin Area. It works great,
but what about adding a second image, say a logo, to the header? Here are the steps
to do so using the Tao of WP child theme as an example.

Screenshot showing the default appearance of


Step 1: Upload your header logo to the child-theme’s /img/ directory on the server. the child theme’s header area.
Note: create the /img/ directory if necessary.

Step 2: Copy the parent theme’s header.php file to the child theme.

Step 3: Add the following image markup just before the <hgroup> in the child
theme’s header.php file:

<img src="/wp-content/themes/wptao-child/img/wptao-logo.png"
class="header-logo" alt="">

Then change the value of the src attribute with the path to your image file,
and upload the modified header.php file to the server.
After completing step 4, the logo is displayed,
Step 4: Open the child theme’s style.css file and add the following lines of CSS: but it’s too close to the top of the page. So we
can add “margin-top: 10px;” (without the
body .header-logo { float: left; width: 150px; height: auto; } quotes) to the .header-logo class. After
body header#page-header hgroup { float: left; } doing so, the header looks like this:
body header#page-header nav { clear: both; }

After uploading the child style.css file to the server, revisit your site and refresh
the page to make sure the new style.css file is loaded by the browser. If all went
according to plan, your logo should be displayed to the left of your site’s title and
tagline. Note that it may be necessary to include some additional CSS rules to
position and style the image as desired. See the sidebar for a quick example.

46
Tips & Tricks : Customize featured images

Customize featured images


Supportive themes enable you to set featured images (aka post thumbnails) for
your posts and pages. This is great, however it’s often necessary to customize how
and where the featured images are displayed. For example, the Tao theme displays
featured images above the title of each post, as shown in the sidebar (top-left). To
change it up, let’s decrease the size of the images, float them left, and add some
margin. We could do it easily with this bit of CSS:

body div#content article div.featured-image {


float: left; max-width: 60%; margin-right: 30px;
}

Like other themes, the ‘Tao of WP’ theme


displays featured images above the title of Adding this snippet to the child theme’s style.css, the featured images will be
each post, which looks good, but there are displayed as shown in the lower-left screenshot. Going further, we could optimize
ways to customize their size and position. performance by serving smaller images instead of resizing them with CSS.

Featured images are stored in the Media Library and sized according to the options
chosen in your Media Settings. There you may specify three sizes for each uploaded
image: thumbnail, medium, and large. Additional sizes may be specified by adding
the following snippet to the theme’s functions.php file:

set_post_thumbnail_size('144', '144', true); // true = crop


add_image_size('wptao-324', 324, 324, true);
add_image_size('wptao-450', 99999, 450, false);

This snippet defines the default size for post thumbnails, and then defines two more
custom sizes. You can define as many custom sizes as necessary with additional
instances of add_image_size(). You can then select and insert custom-size images
After applying a snippet of CSS, the featured
from the dropdown menu on the Insert Media screen.
images are floated left and given a healthy
right margin to keep things looking sharp.

47
Continue the journey…
Get the book @ https://wp-tao.com/

You might also like