41,99 €
Learn how to build a beautiful and feature-rich website or blog with WordPress all on your own.
This book is for anyone who wants to learn how to create a functional website, without having to hire a developer or a designer. The best thing about WordPress—the open source software that we're going to be using—is that it has a minimal learning curve and that everyone can master it quickly. No specific website building experience is required. Having said that, this book will also appeal to everyone who wants to get a bit more in-depth with WordPress development and start working on their own plugins and themes.
WordPress Complete, Sixth Edition is a practical guide for everyone who wants to start their journey as an online publisher, website owner, or even a website developer. It takes you step-by-step through the process of planning out and building your site, and offers loads of screenshots and examples along the way. It's also a beginner's guide to theme and plugin development.
This book begins with the basics of WordPress, followed by the different components that you as a developer will need to use to work swiftly and efficiently.
The book starts by introducing WordPress to new readers in this field. You are then shown how to set it up, implement a blog, and use plug-ins and widgets. You'll use themes to make any website look and feel better and more original. You also learn how to create your own themes and perform testing to ensure your website is bug-free. You will also acquire some idea of how to use WordPress for non-blog-like websites.
By the end of the book, you will feel confident enough to design high-quality websites and will be familiar with the ins and outs of WordPress.
This is a step-by-step tutorial, where we show you how you build a professional-grade website from the ground up, adding more and more complex features as we move on.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 440
Veröffentlichungsjahr: 2017
BIRMINGHAM - MUMBAI
Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: November 2006
Second edition: June 2009
Third edition: January 2011
Fourth edition: November 2013
Fifth edition: April 2015
Sixth edition: August 2017
Production reference: 2241017
ISBN 978-1-78728-570-5
www.packtpub.com
Author
Karol Król
Copy Editors
Charlotte Carneiro
Sameen Siddiqui
Reviewer
Olivier Pons
Project Coordinator
Sheejal Shah
Commissioning Editor
Amarabha Banarjee
Proofreader
Safis Editing
Acquisition Editor
Nitin Dasan
Indexer
Rekha Nair
Content Development Editor
Jason Pereira
Production Coordinator
Melwyn D'sa
Technical Editors
Prajakta Mhatre
Rutuja Vaze
Karol Król is a WordPress developer, PHP programmer, professional blogger, and writer. He has been building expertise in WordPress ever since his early years at the Silesian University of Technology (Poland), where he graduated with a master's degree in computer science. Early in his career, he worked as a freelance website developer for several years. Later on, he decided to shift his interest towards popularizing WordPress as the perfect solution for all web-based projects and devoted his time to growing his writing career.
Olivier Pons is a project manager, highly-skilled developer, and teacher, who's been building websites for many years. He's a teacher in France at the IUT (University of Sciences) of Aix-en-Provence, CESI (Centre d'Études Supérieures en Informatique), ISEN (Institut Supérieur de l’Électronique et du Numérique), G4 Marseille, and École d’Ingénieurs des Mines de Gardanne, where he teaches state of the art web techniques such as Django/Python, NodeJS, big data/NoSQL, MVC fundamentals, PHP for experts, WordPress for experts, Symfony, jQuery, Apache, nginx and Apache advanced configuration, Linux basics, and advanced VIM techniques. He has already done some technical reviews, including the Packt books Learning Ext JS, Building Modern JavaScript Applications, jQuery Hotshots, jQuery Mobile Web Development Essentials, and Meteor JS among others.
In 2011, he left a full-time job as a Delphi developer and PHP expert to concentrate on his own company, HQF Development. He currently runs a number of websites and his own web development blog. He's currently making a Unity mcq mobile application, which works together with a Django website. He sometimes helps CTOs of big companies in making the best choice for their web projects.
For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1787285707.
If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
Introducing WordPress
Getting into WordPress
What WordPress is good for
Starting the journey – what is a blog?
Understanding the common terms
Post
Categories and tags
Comments
Themes
Plugins
Widgets
Menus
Page
Homepage
Users
Why choose WordPress?
Who should use WordPress?
Getting to know the WordPress family
Digging into WordPress – the features
Getting familiar with the new feature list since 4.1
Learning more
Learning more with online WordPress resources
Staying updated with WordPress news
Understanding the Codex
Getting support from other users
Using theme and plugin directories
Summary
Getting Started with WordPress
Building your WordPress website – start here
Using WordPress.com
Publishing your first content on a WordPress.com blog
Installing WordPress manually
Preparing the environment
Downloading WordPress
Uploading the files
Installing WordPress
Installing WordPress through a hand-built configuration file
Learning more
Installing WordPress through an auto-installer script
The wp-admin panel
Changing general blog information
Creating your first post
Writing your first comment
Retrieving a lost password
Getting a Gravatar
Summary
Creating Blog Content
WordPress admin conventions
Lists of items
Posting on your blog
Adding a simple post
Common post options
Categories and tags
Images in your posts
Adding an image to a post
Controlling default image sizes
Editing an uploaded image
Designating a featured image
Videos and other media in your posts
Adding videos to blog posts
Adding audio to blog posts
Limited editing possibilities
Using the Visual editor versus the Text editor
Lead and body
Drafts, pending articles, and timestamps
Drafts
Pending articles
Timestamps
Advanced post options
Excerpt
Discussion
Custom Fields
Working with post revisions
Changing the author of the post
Protecting content
Pretty post slug
Custom post format settings
Additional writing options
Press This
Calypso by WordPress.com
Mobile apps for iOS and Android
Discussion on your blog – comments
Adding a comment
Discussion settings
Submission, notification, and moderation settings
When to moderate or blacklist a comment
Avatar display settings
Moderating comments
How to eliminate comment spam
Working with Akismet
Adding and managing categories
Summary
Pages, Media, and Importing/Exporting Content
Pages
Adding a page
Parent
Order
Managing pages
Media Library
Media Manager
Adding an image gallery
Choosing a post or page
Selecting or uploading images
Importing/exporting your content
Importing content
Exporting content
Summary
Plugins - What They Are and Why You Need Them
Breaking down plugins - what are they?
Why use plugins
Where to get plugins
Finding new plugins
Installing a plugin - the how-to
Manual plugin installation
Auto-installation
The must-have pack of plugins
Backing up
Enabling Google Analytics
Caching
Search engine optimization
Securing your site
Social media integration
Jetpack
Summary
Choosing and Installing Themes
Finding themes
WordPress Theme Directory
Main types of themes
Finding more themes
Some not-design-related theme basics
The structure of a theme
Factors to consider when choosing a theme
The purpose of the theme
Theme licensing
Up-to-date themes only
Themes that are customizable
Themes with a responsive structure
Support, reviews, and documentation
Installing and changing themes
Adding a theme within the wp-admin
Downloading, extracting, and uploading
Summary
Customizing Your Website Appearance/Design
Menus
Adding a menu
Displaying a menu
Widgets
The WordPress Customizer
Site identity
Colors
Header Media
Background
Widgets
Static Front Page
Additional CSS
Summary
Developing Your Own Theme
Setting up your design
Designing your theme to be WordPress-friendly
Three paths of theme development
Building a theme from the ground up
Building a theme with a framework
Building a theme with a starter theme
Converting your design into code
Examining the HTML structure
Examining the CSS
Converting your build into a theme
Creating the theme folder
Name your folder and create backup copies of your build files
Prepare the essential files
Add a screenshot
file screenshot.png and save it in your build folder
Upload your folder
Activate your theme
How to create basic WordPress content
The functions.php file
The <head> tag
The header and footer
The sidebar
Main column – the loop
Creating template files within your theme
Understanding the WordPress theme structure
Breaking it up
The header.php file
The footer.php file
The sidebar.php file
Your four template files
Archive template
Single template
Page template
Generated classes for body and post
Other WordPress templates
Creating and using a custom page template
Making your theme widget-friendly
Going back to our sidebar
Working with the functions.php file
Adding some widgets
Additional widgetizing options
Enabling a menu in your theme
Making your theme editable in the WordPress Customizer
Creating a child theme
Creating the new theme folder
Creating the style sheet
Using your child theme
Sharing your theme
Summary
Social Media Integration, Podcasting, and HTTPS
Integrating social media
Making your blog social media friendly
Setting up social media share buttons
Setting up social media APIs integration
Setting up automatic content distribution to social media
The Jetpack plugin
The Revive Old Post plugin
Setting up social media metrics tracking
Podcasting
Creating a podcast
Recording yourself
Making a post
Podcasting plugins
Using a service to host audio files for free
HTTPS - what, why, and how
What is HTTPS
Why HTTPS is important for a modern WordPress site
How to set up HTTPS
Summary
Developing Plugins, Widgets, and an Introduction to the REST API
Plugins
Building plugins from scratch
Plugin code requirements
Basic plugin - adding link icons
Naming and organizing the plugin files
Writing the plugin's core functions
Adding hooks to the plugin
Trying out the plugin
Adding an admin page
Adding management page functions
Modifying the doctype_styles_new_regex() function
Adding hooks
Trying out the plugin
Testing your plugins
A plugin with database access - capturing searched words
Getting the plugin to talk to the database
Adding management page functions
Trying out the plugin
Learning more
Widgets
Custom tag cloud widget
Naming our widget
The widget structure
The widget initiation function
The widget form function
The widget save function
The widget print function
Custom widget styles
Initiating and hooking up the widget
Trying out the widget
Learning more
Bundling a widget with an existing plugin
Shortcodes
Shortcodes and the way they work
Types of shortcodes
Creating a simple shortcode
The WordPress REST API
What REST API is
Why use WordPress REST API?
How to get started with REST API
Creating a plugin that uses REST API
Summary
Community Blogging
Concerns for a multi-author blog
User roles and abilities
Administrator
Editor
Author
Contributor
Subscriber
Managing users
Enabling users to self-register
User management plugins
Summary
Creating a Non-Blog Website Part One - The Basics
The must-do tasks
Static websites
The process
Building your home page
Creating easy-to-grasp menus
Corporate or business websites
Picking a clean theme
Branding elements
Good navigation
Custom home page
Slider (optional)
One-page websites
Picking a one-page theme
Branding elements
High-quality images
Summary
Creating a Non-Blog Website Part Two - E-Commerce Websites and Custom Content Elements
E-commerce stores
Is WordPress a good platform for an e-commerce store?
Getting a good e-commerce plugin
Plugin installation and initial setup
Setting up the main store pages
Your store location
Shipping and payments
Adjusting your store design
Adding products
Stats – orders, coupons, and reports
Video blogs and photo blogs
Exploring themes for video and photo sites
Getting plugins for video and photo sites
Social networks
Installing a social network
Designing your social network
Extending the functionality
Introducing custom post types
Registering a new post type
Adding labels
Adding messages
Creating book template files
Registering and using a custom taxonomy
Customizing the admin display
Summary
WordPress Complete, Sixth Edition will take you through the complete process of building a fully-functional WordPress site from scratch. The journey goes all the way from teaching you how to install WordPress to the most advanced topics, such as creating your own themes, writing plugins, and even building non-blog websites. The best part is that you can do all of this without losing your shirt along the way. Moreover, once you get some practice, you will be able to launch new WordPress sites within minutes (not a metaphor, by the way; this is as true as it gets).
This book guides you along the way in a step-by-step manner to explain everything there is to know about WordPress. We'll start by downloading and installing the core of WordPress, where you will learn how to choose the correct settings in order to guarantee a smooth experience for yourself and your visitors. After that, this book will teach you all about content management functionalities for your site, from posts and pages to categories and tags, all the way to links, media, menus, images, galleries, administration, user profiles, and more. Next, you will find out what plugins and themes are and how to use them effectively. Finally, you'll learn how to create your own themes and plugins to enhance the overall functionality of your website. Once you're done with WordPress Complete, Sixth Edition, you'll have all the knowledge required to build a professional WordPress site from scratch.
Chapter 1, Introducing WordPress, explains what makes WordPress excellent software that can run your website (blog or not). WordPress is packed with world-class features and is so flexible that it can really do anything you want. It has a wealth of online resources. Additionally, it's super easy to use, and you need no special skills or prior experience to use it. Last but not least, it is free!
Chapter 2, Getting Started with WordPress, describes how to install WordPress on a remote server, change the basic default settings of your blog, write posts, and comment on those posts. This chapter also shows you how to work with sites hosted on WordPress.com, which is one of the branches of the WordPress world.
Chapter 3, Creating Blog Content, teaches everything you need to know in order to add content to your blog and then manage that content, be it posts, categories, and comments, or tags, spam, and excerpts.
Chapter 4, Pages, Media, and Importing/Exporting Content, explores all the other types of content that WordPress is capable of handling. You'll be able to create static pages that aren't a part of your ongoing blog, add various types of media to your posts, and create appealing image galleries to display photos and other images (working with the new media library).
Chapter 5, Plugins - What They Are and Why You Need Them, explains what plugins are, why to use them, how to use them, where to get them, and how to be up-to-date with any new and useful plugins that get released to the community.
Chapter 6, Choosing and Installing Themes, describes how to manage the basic look of your WordPress website. You also get to learn where to find themes, why they are useful, and how to implement new themes in your WordPress website.
Chapter 7, Customizing Your Website Appearance/Design, explores how to manage widgets, navigation menus and work with the basic layout customization features to further enhance the capabilities of your entire website. Also covers the WordPress Customizer--an easy to use interface that allows you to tweak how your current theme looks and performs.
Chapter 8, Developing Your Own Theme, explains how to create your own theme. With just the most basic HTML and CSS abilities, you can create a design and turn it into a fully-functional WordPress theme.
Chapter 9, Social Media Integration, Podcasting, and HTTPS, explores social media integration, podcasting, and HTTPS, which is all about making your website more secure by adding an additional level of encryption to the browser-website communication.
Chapter 10, Developing Plugins, Widgets, and an Introduction to the REST API, teaches everything you need to know about creating basic plugins and widgets: how to structure the PHP files, where to put your functions, and how to use hooks. This chapter also teaches you how to add management pages and build widgets that are run by a plugin.
Chapter 11, Community Blogging, explains how to manage a group of users working on a single blog, which is a community of users. Community blogging can play an important role in a user group or a news website. This chapter also explains how to manage the different levels of privileges for users in the community.
Chapter 12, Creating a Non-Blog Website, Part One – The Basics, explores the endless possibilities of WordPress when it comes to using it to launch various types of websites. This chapter presents the first batch of our non-blog websites and explains in detail how to build them on top of a standard WordPress installation.
Chapter 13, Creating a Non-Blog Website Part Two - E-Commerce Websites and Custom Content Elements, goes through some additional types of non-blog websites and also presents some technical aspects of building them (caution--code talk inside).
A computer
A web browser
A plain text editor
FTP software
You may consider a text editor that highlights code (such as Coda, TextMate, HTMLKit, and so on), but a simple plain text editor is all that's required. You may like to run a local copy of WordPress on your computer, in which case you may need a server such as Apache and MySQL installed (though WAMP and MAMP can take care of all that for you). But even this is not necessary, as you could do the entire thing remotely.
This book is a guide to WordPress for both beginners and those who have slightly more advanced knowledge of WordPress. If you are new to blogging and want to create your own blog or website in a simple and straightforward manner, then this book is for you. It is also for people who want to learn how to customize and expand the capabilities of a WordPress website. You do not require any detailed knowledge of programming or web development, and any IT-confident user will be able to use this book to produce an impressive website.
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning. Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The wp-config.php file allows us to set this."
A block of code is set as follows:
function doctype_styles_new_styles() { wp_register_style('doctypes_styles', plugins_url ('doctype_styles_new.css', __FILE__)); wp_enqueue_style('doctypes_styles'); }
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Click on Save, as you would with any widget."
Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you. You can download the code files by following these steps:
Log in or register to our website using your e-mail address and password.
Hover the mouse pointer on the
SUPPORT
tab at the top.
Click on
Code Downloads & Errata
.
Enter the name of the book in the
Search
box.
Select the book for which you're looking to download the code files
Choose from the drop-down menu where you purchased this book from.
Click on
Code Download
.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
WinRAR / 7-Zip for Windows
Zipeg / iZip / UnRarX for Mac
7-Zip / PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/WordPress-Complete-Sixth-Edition. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at [email protected] with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.
So there she was, with her new business, the business that she left her job as a teacher for, and she needed a website urgently. ASAP, as they say.
At that point, I knew I needed to step in and help her out. After all, she's my mother, and it's hard to say no to your mom.
That was somewhere around 2008, I think, and it was my first real experience having to build a website really quickly and make sure that it is top quality at the same time.
A week later, the thing was online. Built on WordPress.
Back in the day, when you wanted to launch a new website, you either had to learn web programming yourself or hire a professional who would take care of the whole process for you. Those times are gone, and we can thank WordPress for that.
More than a quarter of the entire web runs on WordPress already, and that number is only expected to increase in the coming years. In simple terms, with WordPress, anyone can build a beautiful website with the least amount of effort possible and then make it available to the world in no time.
I feel I need to emphasize on this some more. With WordPress, you don't need to hire a team of developers and designers. You don't need to learn advanced PHP, and you can still end up with a high-quality website with almost unlimited extension possibilities.
Frankly, these days, everyone has a good reason to have a website. It's not just large companies anymore. Individuals, families, freelancers, or small/independent businesses can all benefit from a website. However, not everyone has the financial resources to hire a web development company or a freelance web developer to create a website for them. This is where WordPress comes into play. WordPress is free, easy to use, and packed with excellent features.
In short, WordPress is an open source web software application that you can use to create and maintain a modern website. Since WordPress is a web application, it does not need to be installed on your home PC or Mac, or any other machine under your control. It can live on a server (a kind of computer) that belongs to your website hosting company.
Originally, WordPress was an application meant to run a blog website. However, it has now evolved into a fully featured Content Management System (CMS). Actually, at the time of writing, WordPress powers nearly 30 percent of the entire internet. Impressive, isn't it?
In this chapter, we'll explore:
The reasons that will make you choose WordPress to run your website
The greatest advantages of WordPress
Online resources for WordPress
Some of the most useful features in the newest versions of WordPress
WordPress is an open source content management system. Open source means that the source code of the system is made available with a license whereby the copyright holder provides the rights to study, change, and distribute the software to anyone and for any purpose (as Wikipedia defines it). Content management system means a software application that can run a website (for example, a blog) and allows you to publish, edit, and modify the content. It's a piece of software that lives on the web server (more on what a web server is later on) and makes it easy for you to add and edit posts, themes, comments, and all of your other content. The following is the logo of WordPress:
Even though WordPress was originally a blog engine, used primarily to run blogs, it's now being used by a number of big (by today's standards) online agencies to run their entire websites. Brands such as The New York Times, The Wall Street Journal, Forbes, Reuters, Wired.com, Sony, Toyota, plus some of the biggest artists (such as Beyonce or The Rolling Stones) all use WordPress as the base of their web platforms and outlets.
Undoubtedly, WordPress has evolved a lot over the years, and even though a large number of new functionalities have been introduced, WordPress remains one of the easiest to use web publishing platforms out there.
Originally, WordPress was a fork of an older piece of software named b2/cafelog. WordPress was developed by Matt Mullenweg and Mike Little, but is now maintained and developed by a team of developers that includes Mullenweg.
There are generally three popular types of websites for which WordPress is meant to be used:
A normal website with relatively static content, pages, subpages, and so on
A blog website, chronologically organized and frequently updated, categorized, tagged, and archived
An e-commerce website, a fully functional online store that allows people to buy goods or services, and the website owner to manage orders and fulfill them
However, as experience shows, these days WordPress is successfully used to run a wide variety of other sites as well, such as:
Corporate business sites
One-page profile sites
Portfolio sites
Membership sites
Video blogs
Photo blogs
Product sites
Education sites (e-courses) and more
For those of you unfamiliar with blog websites and blogging terminology, let's take a look at the basics.
Originally, the blog was short for weblog. According to Wikipedia, the term weblog was first used in 1997, and people started using blogs globally in 1999. The terms weblog, web blogging, and weblogger were added to the Oxford Dictionary in 2003, though these days most people leave off the we part.
Just to give you a more plain-English explanation, a blog is a website that usually contains regular entries made by an author. These entries can be of various types, such as commentary, descriptions of events, photos, videos, personal remarks, tutorials, case studies, long opinion pieces, political ideas, or whatever else you can imagine. They are usually displayed in a reverse chronological order, with the most recent additions at the top. Those entries can be organized in a variety of ways, by date, topic, subject, and so on.
One of the main characteristics of a blog is that it's meant to be updated regularly. Unlike a website where the content is static, a blog behaves more like an online diary, wherein the blogger posts regular updates. Hence, blogs are dynamic with ever-changing content. A blog can be updated with new content and the old content can be changed or deleted at any time (although deleting content is not a common practice).
Most blogs focus their content on a particular subject, for example, current events, hobbies, niche topics, and technical expertise. This doesn't mean that blogs are meant to be published only by individuals sharing their personal opinions on given matters. On the contrary, these days, blogs have become a major part in the online presence for many businesses and even corporations. The modern practice of content marketing is now one of the most widely accepted web marketing methods, and its core is based on publishing quality content, often in the blog form.
If you are new to the world of blogging (sometimes called blogosphere, which is a fairly popular expression these days), you may want to familiarize yourself with the following common terms.
Each entry in the blog is called a post. Every post usually has a number of different parts. Of course, the two most obvious parts are title and content. The content is text, images, links, and so on. Posts can even contain multimedia (for example, videos and audio files). Every post also has a publication timestamp, and most have one or more categories and tags assigned to them. It is these posts, or entries, that are displayed in a reverse chronological order on the main page of the blog. By default, the latest post is displayed first, in order to give the viewer the latest news on the subject.
Categories and tags are ways to organize and find posts within a blog and even across blogs. Categories are like topics, while tags are more like keywords. For example, for a blog about food and cooking, there might be a category called Recipes, but every post in that category might have different tags (for example, soup, baked, vegetarian, and dairy-free).
The purpose and correct usage of tags and categories are one of the widely discussed topics among bloggers. Although there are basic guidelines such as the ones presented here, every blogger develops their own approach after a while, and there are no written in stone rules.
Most blogs allow visitors to post comments on the posts. This gives readers the opportunity to interact with the author of the blog, thus making the whole experience interactive. Often, the author of the blog will respond to comments by posting additional comments with a single click on the reply button, which makes for a continuous public online conversation or dialog.
Comments are said to be one of the most important assets for a blog. The presence of a large number of comments shows how popular and authoritative the blog is.
The theme for a blog is the design and layout that you choose for your blog. On most blogs, the content (for example, posts) is separate from the visual layout. This means you can change the visual layout of your blog at any time without having to worry about the content being affected. One of the best things about themes is that it takes only minutes to install and start using a new one. Moreover, there are a number of very good free or low-cost themes available online.
That being said, you need to be careful when working with free themes from uncertain developers. Often, they contain encrypted parts and code that can hurt your site and its presence on Google. Always look for user reviews before choosing a theme. Most importantly, the safest bet is getting your free themes only from the official WordPress directory at https://wordpress.org/themes/. The themes there have been tested and checked for any suspicious code.
You can learn more about this whole issue at http://newinternetorder.com/free-wordpress-themes-are-evil/.
WordPress plugins are relatively small pieces of web software that can be installed on a WordPress site. They extend the native functionality to do almost anything that the technology of today allows. Just like WordPress itself, the code within plugins is open source, which means that anyone can build a new plugin if they have the required skill set. Every WordPress website or blog can work with an unlimited number of plugins (although it is not a recommended approach). The most popular functionalities introduced through plugins include spam protection, search engine optimization (SEO), caching, social media integration, interactive contact forms, and backups.
In short, widgets are a simplified version of plugins. The most common usage of widgets is to have them showcased within the sidebars on your site. Typically, your current theme will provide you with a number of widget areas where you can display widgets (as mentioned, many of these are located in the sidebar). Some of the common usages for widgets is to display content such as categories and tags, recent posts, popular posts, recent comments, links to archived posts, pages, links, search fields, or standard non-formatted text.
We need to talk some history to explain the meaning of menus in WordPress. Back in the day, WordPress didn't allow much customization in terms of tweaking navigation menus and hand-picking the links we wanted to display. This changed in version 3.0, whereby the new Custom Menus feature was introduced. In plain English, it allows us to create completely custom menus (featuring any links of our choice) and then display them in specific areas on our sites. To be honest, this feature, even though it sounds basic, is one of the main ones that have turned WordPress into a full-fledged web publishing platform from a simple blogging tool. I promise this will sound much clearer in the upcoming chapters.
It's important to understand the difference between a page and a post. Unlike posts, pages do not depend on timestamps and are not displayed in a chronological order. Also, they do not have categories or tags. A page is a piece of content with only a title and content (an example would be About Me or Contact Us--the two most popular pages on almost any blog). It is likely that the number of pages on your blog remains relatively static, while new posts can be added every day or so.
A homepage is simply the main page that visitors see when they visit your website by typing in your domain name or URL address. In the early days of WordPress' existence, a homepage wasn't something we used to talk about as a separate kind of page. Originally, a homepage was generated automatically from the newest posts, it was a listing of those posts in a reverse chronological order. Right now, however, WordPress allows us to build a completely custom homepage and display whatever content we wish to it.
As mentioned earlier, WordPress is now a complete web publishing platform. One of its characteristics is that it is capable of working with multiple user accounts, not just a single account belonging to the owner (admin/main author) of the site. There are different types of user accounts available, and they have different credentials and access rights.
WordPress is clearly trying to resemble a traditional publishing house where there are authors, editors, and other contributors all working together. Even though the possibility to create an unlimited number of user accounts won't be that impressive for anyone planning to manage a site on their own, it can surely be a more than an essential feature for big, magazine-like websites.
WordPress is not the only publishing platform out there, but it has an awful lot to offer. In the following sections, I've called attention to WordPress' most outstanding features.
Main benefits of WordPress summarized:
WordPress
gives you full control over your website
. You can change/adjust/modify/customize everything, and I mean everything, about your site.
There are
thousands of themes and plugins
to choose from, hence giving you the possibility to make your website look and work however you wish. WordPress is extremely extendable. Basically, any additional functionality that you can dream of can be added by means of a plugin that you or your programmer friends can write.
The day-to-day work with
the platform is very easy to grasp
. Tasks such as editing content, publishing new articles/posts, or interacting with the audience through comments have no learning curve.
WordPress is open source
. There's no price tag on the platform, you can get it for free. This also means that learning how the platform works under the hood and how to extend it even further doesn't require anyone's permission.
Basically, if you need a website, and you want to be able to build it yourself, then WordPress is the platform that will make it possible.
WordPress is the perfect tool, both for beginners just dipping their toes in website building for the first time and developers working on client websites professionally.
WordPress has been around for quite a while and was in development the whole time. Developers are working on WordPress constantly to keep it ahead of spammers and hackers, and to evolve the application on the basis of the evolving needs of its users.
WordPress is not being developed by a lonely programmer in a dark basement room, by the way. On the contrary, there is a large community of people working on it collaboratively by developing, troubleshooting, making suggestions, and testing the application. With such a large group of people involved, the application is likely to continue to evolve and improve without pause.
WordPress as a platform and as a community of users has grown in two main areas. The first one is gathered around WordPress.org (https://wordpress.org/), the native, main website of the WordPress project. The other is WordPress.com (https://wordpress.com/), a platform providing free blogs for every user who wants one:
Essentially, WordPress.org is about developing the platform itself, sharing new plugins, discussing the technical aspects of WordPress, and being all techie in general. WordPress.com (the preceding screenshot) is a purely community-driven site where bloggers can meet with each other, and publish their content on free blogs under the wordpress.com subdomain (for example, something like https://paleorecipeslog.wordpress.com/ is a subdomain). That being said, there are paid plans available at WordPress.com as well.
In Chapter 2, Getting Started with WordPress, we will discuss all of the differences between having your blog on WordPress.com and downloading the software from WordPress.org and hosting it yourself, but the basic difference is the level of control. If your blog is on WordPress.com, you have less control over plugins, themes, and other details of the blog because everything is managed and made worry-free by the WordPress.com service, which obviously has its pros and cons.
Here is a list of some of the features that WordPress has to offer (in no particular order):
Compliance with the
World Wide Web Consortium
(
W3C
) standards, although it does depend on the theme you're using
Unlimited posts and pages
Unlimited categories and subcategories
Unlimited tags
Mobile friendly (depending on the design/theme you use)
Flexible--
create any type of website you want
Scalable--
can handle any size of website
Automatic syndication (RSS and Atom)
Ability to post via email and mobile devices (there are apps available for all major mobile platforms, including iOS and Android)
Support for plugins and themes
Import of data from other blogs (Moveable Type, Textpattern, Greymatter, b2evolution, Blogger, and others)
Easy to administer and blog without any previous experience
Convenient, fully functional, built-in search
Multilingual capability
Ability to password protect content
Comments manager and spam protection
Built-in workflow (write, draft, review, and publish)
Intelligent text editing via a
What You See Is What You Get
(
WYSIWYG
) editor
Multi-user and multi-author support for user accounts
Feature-rich
Media Library
for managing photos and other non-text content through a visual and highly usable interface
Social media integration capabilities
Dynamic and scalable revision functionality with post (edit) locking
Built-in embed functionality through shortcodes (compatible with services such as YouTube, Vimeo, Flickr, SoundCloud, Reddit Comments, and others)
An admin panel that's accessible via all modern devices, operating systems, and web browsers
Pre-made color schemes for the admin panel
User-friendly image editing, plus a drag-and-drop image importing feature
Advanced
Search Engine Optimization
(
SEO
) features through plugins and themes
Since the last edition of this book was published, quite a staggering number of new features have been added to the WordPress software. If you're new to WordPress, this list may not mean a whole lot to you, but if you're familiar with WordPress and have been using it for a long time, you'll find this list quite enlightening:
New default theme--
Twenty Seventeen
New
Press This
feature--
making it easier to take any content you've found on the web and share it onto your WordPress website
Easier theme installation and switching--
all within the WordPress
Customizer
Easier plugin update and install from the
Plugins
screen--
done with just a couple of clicks
Support for native Chinese, Japanese, and Korean characters, musical and mathematical symbols, hieroglyphs, and also a plethora of emojis (including all of the latest Unicode 9.0 emoji characters)
Improvements to the way that passwords are chosen and changed
Possibility to manage the site's favicon--
both on desktop and mobile
Improved customizer panels and Sections and new Customizer Media Controls
Better display rules for matching images to different screen sizes and devices
Integrated REST API infrastructure and the addition of API endpoints for WordPress content
Extended custom header feature to introduce support for video headers
Added user admin languages and locale switching
Device previewer buttons added to the customizer to better visualize what the website looks like on desktop, tablet, and mobile
Added inline link editing--
enables adding links without switching to modal dialog
Introduction of native device fonts for the WordPress admin panel
Improvements to internationalization
A lot of security improvements to protect your site from hacks and malicious scripts
If you'd like to see detailed lists of all new features added since WordPress Version 4.1, take a look at the docs here:
http://codex.wordpress.org/Version_4.2
http://codex.wordpress.org/Version_4.3
http://codex.wordpress.org/Version_4.4
http://codex.wordpress.org/Version_4.5
http://codex.wordpress.org/Version_4.6
http://codex.wordpress.org/Version_4.7
http://codex.wordpress.org/Version_4.8
http://codex.wordpress.org/Version_4.9
http://codex.wordpress.org/Version_5.0
Also, you can read a fully explained feature list at https://wordpress.org/about/features/.
One very useful characteristic of WordPress is that it has a large, active online community. Everything you will ever need for your WordPress website can likely be found online, and probably for free. In addition to this, these days we can also find many paid resources and training programs that offer expert advice and training, revolving around many different possible usages of a WordPress site.
As WordPress is constantly being developed, it's important to keep yourself up to date with the software community's latest activities.
If you visit the dashboard of your own WordPress site regularly, you'll be able to stay up-to-date with WordPress news and software releases. There are widgets on the dashboard that display the latest news and announcements, and an alert always appears when there is a new version of WordPress available for download and installation.
If you prefer to visit the website, then the most important spot to visit or subscribe to is WordPress Releases. Whenever there is a new release, be it a major release, or an interim bug fix, or an upgrade, it will be at https://wordpress.org/news/category/releases/.
Also, be sure to stay tuned to the main WordPress blog at https://wordpress.org/news/.
Some additional resources worth mentioning are as follows:
https://wordpress.org/
: The absolute main hub for WordPress
https://wordpress.com/
: The main platform for free WordPress blogging
http://jobs.wordpress.net/
: Job listings for anyone searching for employment in various areas related to WordPress (or anyone searching for WordPress help)
http://wordpress.tv/
: A great source of top-notch WordPress tutorials, how-to advice, case studies, product demonstrations, and WordPress-related conference presentation recordings
https://central.wordcamp.org/
: WordCamp is a conference that focuses on everything WordPress; it takes place a number of times during the year in different locations around the world, and this site is the central point for the conference
The WordPress Codex is the central repository of all the information that the official WordPress team has published to help people work with WordPress.
The Codex has some basic tutorials for getting started with WordPress, such as a detailed step-by-step discussion of the installation, and lists of every template tag and hook. Throughout this book, I'll be providing links to specific pages within the Codex, which will deliver more or advanced information on the topics in this book.
The Codex can be found at https://codex.wordpress.org/Main_Page. Refer to the following screenshot:
Apart from the Codex, there's also one more resource that will come in handy to new and experienced developers alike. It's called the WordPress Code Reference, and it can be found at https://developer.wordpress.org/reference/. It delivers a lot of docs on WordPress' functions, classes, methods, and hooks.
The online WordPress community asks questions and responds with solutions on the WordPress forum at https://wordpress.org/support/. It's an excellent place to go if you can't find the answer to a problem in the Codex. If you have a given question, then probably someone else has had it as well, and WordPress experts spend time in the forum answering them and giving solutions.
There are official directories for themes and plugins on WordPress.org. Though not every theme and plugin is available here, the ones that are have been vetted by the community to some extent. Anything you download from these directories is likely to be relatively bug-free. Plugins and themes that you get from other sources can have malicious code, so be careful. You can also see what the community thinks of these downloads by looking at ratings, comments, and popularity.
Additionally, plugins in the Plugin Directory are automatically updatable from within your WordPress administration panel (wp-admin), while other plugins have to be updated manually. We'll cover this in detail in a later chapter.
You can find the Theme Directory at https://wordpress.org/themes/ and the Plugin Directory at https://wordpress.org/plugins/ as shown in the following screenshot:
Having a website of your own is essential these days, no matter if you are an individual or a small business, and no matter if you are blogging regularly or want some accurate static content up on the internet. In this chapter, we reviewed basic information about WordPress, blogging, and common blog terms for those of you who are new to the concept.
WordPress is an excellent software application that can run your website (blog or not). It's packed with excellent features and is so flexible that it can really do anything you want, and it has a wealth of online resources. Additionally, it's easy to use, and you need no special skills or prior experience to work with it. Last but not least, it is 100% free!
In the next chapter, we will explore the choices and steps involved in installing WordPress and getting started.
This chapter will guide you through the process of setting up WordPress and customizing its basic features. You can choose between a couple of options regarding where your WordPress website will live. WordPress is relatively small (less than 10 MB) as well as easy to install and administer.
WordPress is available in easily downloadable formats at https://wordpress.org/download/. WordPress is a free, open-source application and is released under GNU General Public License (GPL) - https://en.wikipedia.org/wiki/GNU_General_Public_License. This means that anyone who produces a modified version of the software released under the GPL is required to maintain the same freedom and that people buying or using the software can also modify and redistribute it. Thus, WordPress and other software released under the GPL are maintained as open source. In this chapter, you will learn how to:
Create a free blog on WordPress.com
