0%

Book Description

Explore built-in WordPress features and the power of advanced plugins and themes for building modern websites using exciting recipes

Key Features

  • Build custom features and extend built-in features in WordPress with custom coding and plugins
  • Get to grips with extending WordPress as an application framework
  • Manage non-functional aspects of your website such as security, performance, and maintenance

Book Description

WordPress has been the most popular content management system (CMS) for many years and is now powering over 30% of all websites globally. With the demand for WordPress development and skilled developers ever-increasing, now is the best time to learn WordPress inside out.

This book starts with simple recipes for configuring WordPress and managing basic platform features. You'll then move on to explore how to install and customize WordPress plugins, widgets, and themes. The next few chapters cover recipes for content and user-management-related topics such as customizing the content display, working with content types, using the new Gutenberg editor, and customizing editorial workflow for building advanced blogs. As you advance, you'll learn how to use WordPress as an application framework as well as a platform for building e-commerce sites. This WordPress book will also help you optimize your site to maximize visibility on search engines, add interactivity, and build a user community to make the site profitable. Finally, you'll learn how to maintain a WordPress site smoothly while taking precautions against possible security threats.

By the end of the book, you'll have the tools and skills required to build and maintain modern WordPress websites with the latest technologies and be able to find quick solutions to common WordPress problems.

What you will learn

  • Install and customize WordPress themes and plugins for building websites
  • Develop modern web designs without the need to write any code
  • Explore the new Gutenberg content editor introduced in WordPress 5 (Bebo)
  • Use the existing WordPress plugins to add custom features and monetize your website
  • Improve user interaction and accessibility for your website with simple tricks
  • Discover powerful techniques for maintaining and securing your websites
  • Extend built-in WordPress features for advanced website management

Who this book is for

This book is for beginners who want to build powerful modern websites with minimum coding knowledge and intermediate web developers who want to extend the basic features of WordPress to cater to advanced modern website technologies. Although prior experience with WordPress is not required, familiarity with basic PHP, HTML, and CSS is necessary to understand the concepts covered.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. WordPress 5 Cookbook
  3. Dedication
  4. About Packt
    1. Why subscribe?
  5. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Conventions used
    4. Get in touch
      1. Reviews
  7. Setting Up WordPress and Customizing Settings
    1. Technical requirements
    2. Managing media files with the Media Library
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Setting up the discussion process
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Creating and managing a privacy policy
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Customizing default WordPress emails
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Configuring the structure of permalinks
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Setting up WordPress Multisite
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Creating a new site in a multisite network
      1. Getting ready
      2. How to do it...
      3. How it works...
    9. Managing multisite themes and plugins
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Cloning a site in a multisite installation
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  8. Customizing Theme Design and Layout
    1. Technical requirements
    2. Using the theme customizer
      1. Getting ready
      2. How to do it...
        1. Site Identity tab
        2. Colors tab
        3. Menus tab
        4. Widgets tab
        5. Homepage Settings tab
      3. How it works...
    3. Working with Custom CSS in live preview
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Using a custom page as a home page
      1. Getting ready 
      2. How to do it... 
      3. How it works...
      4. There's more...
    5. Creating a child theme
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Styling navigation menus
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Creating conditional navigation menus
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Adding a video header to the theme
      1. Getting ready
      2. How to do it...
      3. How it works...
    9. Using conditional tags to control content display 
      1. Getting ready
      2. How to do it...
        1. Displaying conditional content on the archive and single posts
        2. Displaying content for guests and members
        3. Using multiple conditional tags
      3. How it works...
        1. Displaying conditional content on the archive and single posts
        2. Displaying content for guests and members
        3. Using multiple conditional tags
      4. There's more...
    10. Creating page templates from scratch
      1. Getting ready
      2. How to do it...
      3. How it works...
    11. Creating a custom posts list template
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    12. Creating a custom 404 error page 
      1. Getting ready 
      2. How to do it...
      3. How it works...
      4. There's more...
  9. Using Plugins and Widgets
    1. Technical requirements
    2. Managing widgets in widget areas
      1. Getting ready
      2. How to do it...
        1. Adding a Text widget to the footer area
        2. Adding a Gallery widget to the footer area
      3. How it works...
      4. There's more...
    3. Creating a simple widget from scratch
      1. Getting ready
      2. How to do it...
      3. How it works...
        1. Understanding the functionality of a form function
        2. Understanding the functionality of the widget function
        3. Understanding the functionality of the update function
    4. Creating additional widget areas
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Displaying conditional widgets with built-in tags
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Displaying widgets inside of posts and pages
      1. Getting ready
      2. How to do it...
      3. How it works...
    7. Modifying plugin files with the built-in Plugin Editor
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Working with custom PHP codes
      1. Getting ready
      2. How to do it...
      3. How it works...
    9. Manually deactivating plugins
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Customizing WordPress plugins with actions and filters
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  10. Publishing Site Content with the Gutenberg Editor
    1. Adding and removing Gutenberg blocks
      1. Getting ready
      2. How to do it...
      3. How it works...
        1. Using a Paragraph block inside the editor
        2. Using a Gallery block inside the editor
    2. Using the Visual and Code editors with the block editor
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Creating reusable Gutenberg blocks
      1. Getting ready 
      2. How to do it...
        1. Creating a reusable block
        2. Using reusable blocks
      3. How it works...
      4. There's more...
        1. Editing reusable blocks from the Gutenberg editor
        2. Converting a regular block into a reusable block
        3. Using reusable blocks within other reusable blocks
    4. Styling built-in content blocks
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Embedding content from external services
      1. Getting ready 
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Simplifying block editing with Gutenberg tools
      1. Getting ready
      2. How to do it...
        1. Adding blocks before or after a block
        2. Duplicating blocks
        3. Customizing block arrangement
      3. How it works...
        1. Adding blocks before or after a block
        2. Duplicating blocks
        3. Customizing block arrangement
    7. Adding a post grid with Gutenberg
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Adding a contact form using Gutenberg
      1. Getting ready
      2. How to do it...
      3. How it works...
  11. Managing Users and Permissions
    1. Technical requirements
    2. Enabling new user registrations
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Managing user roles and permissions
      1. Getting ready
      2. How to do it...
        1. Creating a new user role
        2. Updating the capabilities of user roles
        3. Creating a new capability
      3. How it works...
        1. Creating a new user role
        2. Updating the capabilities of user roles
        3. Creating a new capability
    4. Assigning user roles to existing users
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Creating a custom role and setting up a default role
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Improving user profiles with additional fields
      1. Getting ready
      2. How to do it...
      3. How it works...
    7. Managing the visibility of the admin toolbar 
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Adding custom features to the user list
      1. Getting ready
      2. How to do it...
      3. How it works...
    9. Displaying online users
      1. Getting ready
      2. How to do it...
      3. How it works...
    10. Adding email activation for new user accounts
      1. Getting ready
      2. How to do it...
      3. How it works...
        1. Sending the activation email
        2. Blocking the login for pending activation
        3. Activating the user from an email link
    11. Switching users
      1. Getting ready
      2. How to do it...
      3. How it works...
    12. Displaying recently registered users
      1. Getting ready
      2. How to do it...
      3. How it works...
    13. Creating a frontend user list and search
      1. Getting ready
      2. How to do it...
      3. How it works...
  12. Setting up a Blogging and Editorial Workflow
    1. Technical requirements
    2. Publishing and scheduling blog posts
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Displaying author profiles in posts
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Enabling frontend post publishing
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Modifying a user list to show author publishing details
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Managing custom post statuses
      1. Getting ready
      2. How to do it...
      3. How it works...
    7. Setting up a discussion between authors and editors
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Splitting a single post into multiple parts
      1. Getting ready
      2. How it works...
      3. How to do it...
    9. Creating private posts for specific users
      1. Getting ready
      2. How to do it...
      3. How it works...
    10. Adding ratings to blog posts
      1. Getting ready
      2. How to do it...
      3. How it works...
    11. Podcasting with WordPress
      1. Getting ready
      2. How to do it...
      3. How it works...
  13. WordPress as an Application Framework
    1. Technical requirements
    2. Managing advanced data with custom post types
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Creating and managing advanced post fields
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Working with WordPress loop
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Displaying advanced post fields
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Restricting post/page content with shortcode
      1. Getting ready
      2. How to do it...
      3. How it works...
    7. Capturing data with dynamic forms
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Creating custom routes
      1. Getting ready
      2. How to do it...
      3. How it works...
    9. Storing custom data in existing tables
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Creating and managing custom tables
      1. Getting ready
      2. How to do it...
      3. How it works...
    11. Using the REST API
      1. Getting ready
      2. How to do it...
      3. How it works...
  14. Improving Usability and Interactivity
    1. Technical requirements
    2. Creating a mobile-friendly site
      1. Getting started
      2. How to do it...
      3. How it works...
    3. Adding print, PDF, and email buttons to posts
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Customizing WordPress search
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Searching specific categories and meta values
        2. Limiting searching to a set of posts
        3. Differentiate search results for multiple searches
    5. Displaying a frontend login form
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Optimizing images
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Lazy loading posts with Ajax
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Highlighting the search term in the search results
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Creating breadcrumbs for better navigation
      1. Getting ready
      2. How to do it...
      3. How it works...
    10. Adding an image gallery to pages
      1. Getting ready
      2. How to do it...
      3. How it works...
    11. Allowing testimonials on your site
      1. Getting ready
      2. How to do it...
      3. How it works...
    12. Integrating a forum into your site
      1. Getting ready
      2. How to do it...
      3. How it works...
  15. Building E-Commerce Sites with WooComerce
    1. Technical requirements
    2. Setting up an e-commerce site with WooCommerce
      1. Getting ready
      2. How to do it...
        1. Configuring product settings
        2. Configuring shipping settings
        3. Configuring payment settings
        4. Configuring Accounts and Privacy settings
        5. Configuring Advanced settings
      3. How it works...
        1. General settings
        2. Product settings
        3. Shipping settings
        4. Payment settings
        5. Account and Privacy settings
        6. Advanced settings
    3. Creating and displaying a product
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Creating orders and managing order statuses
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Displaying WooCommerce products on custom pages
      1. Getting ready
      2. How to do it...
        1. Displaying WooCommerce products with shortcodes
        2. Displaying WooCommerce products with Gutenberg blocks
      3. How it works...
        1. Using shortcodes for products
        2. Using Gutenberg blocks for products
    6. Building custom product types
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Selling memberships with membership products
        2. Selling event tickets
    7. Customizing the shop template
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Customizing the product page template
      1. Getting ready
      2. How to do it...
      3. How it works...
        1. Adding custom content after the Add to Cart button
        2. Adding custom content between existing items
  16. Troubleshooting WordPress
    1. Technical requirements 
    2. Configuring error logs and displaying errors
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Fixing the WSoD
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Resolving conflicts in maintenance mode
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Manually resetting user passwords
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Fixing slow WordPress sites
      1. Getting ready
      2. How to do it...
        1. Using caching to improve loading time
        2. Using minification to improve loading time
        3. Limiting plugins and queries to improve loading time
      3. How it works...
    7. Fixing issues with cached content
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Resolving WordPress core database issues
      1. Getting ready
      2. How to do it...
      3. How it works...
    9. Resolving JavaScript errors
      1. Getting ready
      2. How to do it...
        1. A WordPress core script file is causing the issue
        2. A script file from a plugin is causing the issue
      3. How it works...
    10. Fixing issues caused by theme/plugin upgrades
      1. Getting ready
      2. How to do it...
      3. How it works...
  17. Handling Performance and Maintenance
    1. Technical requirements
    2. Limiting post revisions
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Creating and scheduling database backups
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Restoring database backups
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Tracking site activities
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Identifying and resolving broken site links
      1. Getting ready
      2. How to do it...
      3. How it works...
    7. Backing up site files and uploads
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Cleaning unused data from the database
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Setting up maintenance mode
      1. Getting ready
      2. How to do it...
      3. How it works...
    10. Migrating WordPress sites to new servers
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    11. Migrating from Drupal to WordPress
      1. Getting ready
      2. How to do it...
      3. How it works...
    12. Migrating from Joomla to WordPress
      1. Getting ready
      2. How to do it...
      3. How it works...
  18. Improving Site Security
    1. Technical requirements
    2. Upgrading the WordPress version
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Disabling plugin and theme file editing
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Protecting backend logins by limiting login attempts
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Creating automatically expiring user passwords
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Securing user accounts
      1. Getting ready
      2. How to do it...
        1. Changing the admin username
        2. Displaying a custom login error message
        3. Adding strong passwords to users
      3. How it works...
        1. Changing the admin username
        2. Displaying a custom login error message
        3. Adding strong passwords to users
    7. Forcing logout for all users
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Protecting user accounts with two-factor authentication
      1. Getting ready
      2. How to do it...
      3. How it works...
    9. Protecting private sites with a global password
      1. Getting ready
      2. How to do it...
      3. How it works...
    10. Limiting site access to certain IPs
      1. Getting ready
      2. How to do it...
      3. How it works...
    11. Securing database user accounts
      1. Getting started
      2. How to do it...
      3. How it works...
    12. Testing site security issues
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  19. Promoting and Monetizing the Site
    1. Technical requirements
    2. Enabling visibility for search engines
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Optimizing pings to third-party services
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Creating an XML sitemap
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Optimizing content for search engines
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Adding social sharing buttons to posts
      1. Getting ready
      2. How to do it...
      3. How it works...
    7. Building an audience with newsletters
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Building a landing page with a page builder
      1. Getting ready
      2. How to do it...
      3. How it works...
    9. Integrating Google Analytics
      1. Getting ready
      2. How to do it...
      3. How it works...
    10. Monetizing the site with custom ad spots
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    11. Integrating Google AdSense for displaying ads
      1. Getting ready
      2. How to do it...
      3. How it works...
  20. Appendix
    1. Configuring and setting up WordPress
    2. Understanding the WordPress database
    3. Working with the WordPress database
      1. Viewing data of database tables
      2. Viewing data of selected records
    4. Understanding the WordPress directory structure
    5. Additional resources
  21. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think
18.221.36.208