You are previewing Smashing WordPress: Beyond the Blog, 4th Edition.
O'Reilly logo
Smashing WordPress: Beyond the Blog, 4th Edition

Book Description

The ultimate guide to using WordPress to make your life easier

WordPress guru Thord Daniel Hedengren takes you beyond the blog to give you the tools and know-how needed to build just about anything in WordPress. You'll discover how to use WordPress as a CMS to power fully-fledged websites, photo galleries, forums, eCommerce sites, and much more. You get step-by step instructions on developing model sites from the ground up and how to utilize and build plugins that let you take WordPress to the next level.

You will learn how to:

  • Use custom post types and custom taxonomies

  • Add and work with custom headers, backgrounds, and more

  • Build gorgeous WordPress themes with the latest features

  • Create custom login forms and admin themes

  • Control content with the loop (and alternatives to the loop)

  • Integrate theme options and the theme customizer

  • Extend WordPress with widget functionality

  • Build WordPress projects for SEO

  • Integrate WordPress with the social web

  • Create helpful navigation using the navigation menu

  • Use conditional control elements

  • Get started with your own responsive themes

  • Updated and revised to cover the changes to WordPress 3.8, Smashing WordPress: Beyond the Blog, 4th Edition, is the ultimate guide to getting the most out of WordPress.

    Table of Contents

      1. Introduction
        1. Part I: Getting Started with Wordpress
        2. Part II: Designing and Developing Wordpress Themes
        3. Part III: Using Plugins with Wordpress
        4. Part IV: Additional Features and Functionality
        5. Start Thinking and Get Publishing!
        1. Chapter 1: The Anatomy of a Wordpress Install
          1. The Basic Install
            1. The Guided Installation Method
            2. The Manual Installation Method
            3. Using an External Database Server
            4. Other Database Settings
            5. Useful wp-config.php Features
            6. A Few Words on Installers
          2. Moving the Wordpress Install to a Different Directory
          3. Hacking the Database
            1. Learning Where Everything Is
            2. Fixing Issues by Hacking the Database
          4. Backing Up
          5. Switching Hosts
            1. Using the Export and Import Tools
            2. When Export/Import Won't Work
          6. How to Make Your Wordpress Install More Secure
            1. Users and Passwords
            2. Server-Side Security Steps
          7. Looking Ahead
        2. Chapter 2: The Wordpress Syntax
          1. Wordpress and Php
          2. The Wordpress Codex
          3. The Wordpress Core
          4. Themes and Template Files
          5. Using the Template Tags
            1. The Include Tags
            2. Passing Multiple Parameters to a Template Tag
            3. Function and Query-String Style Arguments
            4. Understanding Data Types
          6. Conditional Tags
            1. Why is this Great?
          7. Next Up: The Loop
        3. Chapter 3: The Loop
          1. Understanding the Wordpress Loop
            1. The Basic Loop
            2. Separating the Loop Using the Template Parts
            3. A Few Words About wp_query
          2. Using the Loop
            1. Using Sticky Posts
            2. Working with Post Formats
            3. The get_template_part() and Post Formats
            4. Modifying the Query with pre_get_posts
          3. Alternatives to the Loop
          4. Multiple Loops
            1. Featured Posts with Multiple Loops
            2. Three’s a Charm, but Four Loops Are Way Cooler
          5. Getting More Comfortable with the Loop
        1. Chapter 4: Wordpress Theme Essentials
          1. Theme Basics
            1. Elements of the Basic Theme
          2. This is What You're Doing
            1. A Few Words on Html5
          3. Creating the Template Files
            1. The Theme Declaration in style.css
            2. Up Top, the header.php File
            3. The Footer, with footer.php
            4. The Right Column: sidebar.php
            5. The Content Flow, Using index.php
            6. Breaking Out the Loop
            7. Single Posts and Pages
            8. Archive Templates
            9. 404, Search, and Screenshots
          4. Features with functions.php
          5. Understanding Template Files
            1. Which Template File Is Used When?
            2. The Template Hierarchy
            3. Page Templates
          6. Using functions.php
            1. Setting the Default Width
            2. Inserting Promotions with functions.php
          7. Understanding Widgets and When to Use Them
            1. Declaring Widget Areas
            2. Using Multiple Widget Areas
            3. Customizing Widgets
          8. Making Comments Look Good
            1. Threaded Comments
            2. Author Highlighting
          9. Adding Custom Fields
            1. Common Usage
            2. The Usability Factor
          10. Developing a Starter Theme
          11. Releasing a Theme
            1. Theme Checklists
            2. Commercial Themes and the Gpl License
            3. Submitting to
          12. Moving Onward with Themes
        2. Chapter 5: The Child Theme Concept
          1. The Brilliance of Child Themes
            1. How Child Themes Work
            2. The Beauty of Template File Overriding
            3. The Wonderful Template Parts
            4. Event Child Themes
          2. Child Themes and Internationalization
          3. The Flip Side of Inheritance
          4. Common Issues to Keep in Mind
          5. Managing Several Sites Using Child Themes
            1. Managing Design for Multiple Sites
            2. Don't Forget About functions.php
            3. There is Such a Thing As too Much
          6. What About Theme Frameworks?
            1. Let's Talk About Parent Themes Instead
          7. Taking Themes to the Next Level
        3. Chapter 6: Advanced Theme Usage
          1. Outlining the Theme
            1. Rule #1: Style by Category, Sort by Tag, and Tune with Post Formats
            2. Rule #2: Carefully Consider Custom Fields
            3. Rule #3: Build with Pages and Extend with Custom Post Types
            4. Is That All?
          2. Individual Styling Techniques
            1. Styling the Posts
            2. Body Class Styling
            3. Sticky Posts
          3. Using Custom Fields
            1. Custom Field Basics
            2. Creating Meta Boxes
          4. Fancy Custom Features
            1. Properly Adding Functions in functions.php
            2. Featured Images
            3. Custom Menus
            4. Custom Headers
            5. Custom Background Images
          5. The Theme Customizer and Theme Options
            1. Adding Your Own Theme Settings
            2. Theme Option Pages
            3. Theme Customizer or Theme Options?
          6. Mastering Action Hooks
            1. Hooking On
            2. Creating Your Own Action Hooks
            3. Removing Actions from Hooks
          7. Using Taxonomies
            1. Purposes for Custom Taxonomies
            2. Get Your Mind Working
            3. Taxonomies and Portability
          8. The Power of Custom Post Types
            1. Using Custom Post Types
            2. Theming Custom Post Types
          9. Multiple Language Support
            1. Working with Language Files
            2. The Naming Issue
          10. Working with Rss Feeds
            1. The Wordpress Feeds
            2. Build a Custom Feed Url
          11. Basic Seo Implementations
          12. Trimming Wordpress on the Theme Side
          13. Themes Versus Plugins
        1. Chapter 7: Making the Most of WordPress Plugins
          1. Plugins Are Great
            1. About the Feature-As-Plugin Concept
          2. Different Types of Plugins
            1. Regular Plugins
            2. Drop-in Plugins
            3. Must-Use Plugins
          3. Getting the Most out of the Plugin Ecosystem
            1. A Checklist for Choosing a Plugin
            2. Tweaking Plugins
          4. Developing Plugins for Networks
            1. Sitewide WordPress Plugins
          5. Plugin Basics
          6. Methods for Incorporating Your Plugins
            1. Using Hooks
            2. Creating Your Own Template Tags
            3. The Pluggable Functions
          7. Custom Taxonomies and Custom Post Types
            1. Why Use a Plugin?
            2. Creating a Custom Taxonomy
            3. Creating a Custom Post Type
          8. Must-Have Functionality for Plugins
            1. Plugin Settings
            2. Database Content and Uninstalling
            3. After Uninstalling
          9. Building the AddAff Plugin
            1. The AddAff Settings Page
            2. Creating the AddAff Meta Box
            3. Filtering the_Content
            4. Wrapping It Up
          10. Adding Widget Support to Plugins
            1. Creating a Widget
            2. Dashboard Widgets
          11. Plugins and the Database
          12. Backward Compatibility for Plugins
            1. Check If a Function Exists
          13. Hosting Your Plugins on WordPress.Org
          14. A Final Word of Warning and Encouragement
        2. Chapter 8: Plugins or functions.php?
          1. When to Use a Plugin
            1. Extending Functionality with Plugins
            2. Caution: Plugins Can Slow Down Your Site
          2. When to Use functions.php
          3. The Shortcode Dilemma
          4. Solve It with Child Themes
          5. The Best of Both Worlds: A Functionality Plugin
            1. Create Your Own Functionality Plugin
          6. The Importance of Portability
          7. Planning for Extended Functionality in Your Wordpress Site
        1. Chapter 9: Using WordPress As a Cms
          1. Is WordPress the Right Choice for Your Cms?
          2. WordPress CMS Checklist
          3. Trimming WordPress to the Essentials
            1. Tweaking the Admin Interface
            2. Don't Forget the Theme Customizer
            3. Unblogging WordPress
          4. The Perfect Setup for a Simple Static Website
          5. Doing More Than the Basics
            1. Uses for Custom Post Types and Taxonomies in a WordPress Cms
            2. Putting Widgets to Good Use in a CMS
          6. Managing Menus
          7. Integrating Non-WordPress Content
          8. Don't Forget to Include a Manual
          9. A Final Word on Using Wordpress As a CMS
        2. Chapter 10: Integrating the Social Web
          1. Integrating Facebook into Your Site
            1. The Like Button
            2. Profile Widgets
            3. Facebook Comments
          2. Integrating Twitter
            1. Adding Twitter Buttons and Widgets
            2. Twitter and Short Urls
          3. Adding Google+ to Your Site
          4. Share and Follow on Tumblr
            1. The Follow Button
            2. The Share to Tumblr Button
          5. Pin to Pinterest
          6. Share to Linkedin
          7. Cross-Publishing
            1. Some Cross-Posting Solutions
          8. Using a Hosted Comment Solution
          9. Using Unified Logins
          10. Plugins and Overhead
          11. The Importance of the Social Web
        3. Chapter 11: Design Trickery
          1. Adding More Control over Your Posts
            1. Tag-Based Design
            2. Using Custom Fields
            3. Hooking on to body_class(), post_class(), and comment_class()
            4. Adding Your Own Taxonomy
          2. Improving the Menu
            1. Thinking About Hover-Based Menus
          3. Placing Ads Within the Loop
          4. Creating 404s That Help the Visitor
          5. Using Javascript Libraries with Wordpress
            1. Registering Scripts
          6. Making Wordpress Your Own
            1. A Custom Login Form
            2. Admin Themes
          7. Making Your Theme Responsive
            1. Media Queries
            2. Responsive Design Considerations
          8. Polishing Your WordPress Site
        4. Chapter 12: Fun with Media
          1. Working with Image Galleries
          2. Styling the Gallery
            1. Better Browsing with Lightbox
            2. Using Outside Scripts and Systems
          3. The Media Post Formats
          4. Embedding Media Content
            1. Getting the Settings Right
            2. The Magic of Oembed
          5. Randomizing Image Elements
            1. Displaying Random Images from Your Galleries
            2. More Random Image Options
          6. Making the Most of Image-Sharing Services
            1. Posting from Flickr
          7. Beware of the Clutter
        5. Chapter 13: Extra Functionality
          1. Tabbed Boxes
            1. Smart Usage
            2. To Tab or Not to Tab
          2. Displaying Rss Feeds
            1. The Built-in Parser
            2. Caching with the Transients API
            3. When to Use the Widget Solution
            4. Multiple Feeds with SimplePie
          3. Custom Shortcodes
            1. Adding Shortcodes
            2. Shortcode Tidbits
            3. What About the Visual Editor?
          4. Sending E-Mail with WordPress
          5. Personalizing the Login Form
            1. Adding Your Own Login Form
          6. Print That Blog
          7. And Even More . . .
        6. Chapter 14: Uncommon WordPress Usage
          1. Working with User-Submitted Content
            1. Receiving Guest Posts
            2. Handling User News and Reviews
            3. Rolling a Bootstrapped Job Board
            4. Using wp_editor()
            5. A Final Word About User-Submitted Content
          2. Using Wordpress As a FAQ-Like Knowledge Base
            1. Adding the Functionality
            2. Including Further Enhancements
          3. WordPress and eCommerce
            1. Running a Web Shop on Wordpress
            2. Selling Digital Products
            3. Building for eCommerce
          4. Building a Product Directory
            1. Creating the Book Post Type
            2. Creating the Book Page
            3. Showing Off the Products
          5. Tasty Blogging: Using WordPress for Recipes
            1. Starters: the Theme
            2. Main Course: the Recipe Post Type
            3. Dessert: Custom Taxonomies
            4. Digestif: What You Have So Far
          6. Building a Links Site
            1. The Alternative: The Link Post Format
            2. Some Thoughts About Usage
            3. Mixing Link Posts with Traditional Content
          7. Short and Sweet: Other Uses for WordPress
            1. An Event Page and a Calendar
            2. Intranets and Collaboration
            3. Communities and Forums
            4. Databases
            5. Static Sites
            6. Journals and Notes
          8. You Can Build Anything You Want