Introduction
WordPress pages are the default built-in post type for publishing content to your WordPress blog. However, using pages was not an option until WordPress version 1.5 was released in 2005. Previously, WordPress was primarily used as a blogging platform, allowing users to write and publish posts. Users eventually developed a desire for different post types that would allow them to distinguish between dynamic blog posts and static pages that rarely change.
Before starting, let’s learn about pages.
Pages
- Pages are for content that isn't time-sensitive or qualifies as "blog content."
- Pages can be divided into subpages and pages.
- Pages can make use of various page templates, such as template files, Template Tags, and other PHP code.
- More advanced themes may offer a broader range of customisation or display options for individual pages.
- Creating a WordPress website that consists solely of pages is entirely possible.
Now, let’s learn about creating and organizing pages in WordPress.
Creating Pages
Log in to your WordPress installation with sufficient admin privileges to create new pages to create a new Page. To begin writing a new Page, go to Pages > Add New.
Organising Your Pages
Subcategories can exist within Categories, and subpages can exist within Pages, resulting in a page hierarchy.
A WordPress site for a travel agency, for example, might include a separate Page for each continent and country where the agency can make travel arrangements. For example, Subpages for Cameroon, Lesotho, Swaziland, and Togo will be added to the "Africa" page. Another parent Page called "South America" would include subpages for Argentina, Brazil, and Chile.
The structure of the website's pages would then look like this.
-
Africa
Cameroon
Lesotho
Swaziland
Togo -
South America
Argentina
Brazil
Chile
Creating a List of Pages
WordPress can automatically generate a list of pages on your site in the sidebar or footer, for example, by using the wp_list_pages Template Tag (). For information on how to customise how WordPress displays the list of pages on your site, see the wp_list_pages page.
There are also WordPress Plugins available to assist you in displaying a list of Pages within Posts and other areas of your WordPress Theme.
Now, let’s understand page attributes and the visibility of pages.
Page Attributes
The Page Attributes section assigns your new page a parent page and a template.
- You can organise your pages into page hierarchies for the Parent section. You could, for example, construct this new page and subpages beneath it. Alternatively, you might add your new page as a child page to an existing page.
- Template- Some WordPress themes include custom page templates, the next Template section lets you apply one to your new page.
- The Organize box allows you to order your page numerically. Pages are typically arranged alphabetically, but you can change this by adding a number in this area.
Status & Visibility
The status and visibility section describes how and if your page is viewable.
You can choose between three alternatives when it comes to visibility.
- Public - Visible to everyone
- Private - Only site administrators and editors have access to it.
- Password-Protected -Make the page readable only with a password you choose. This page is only accessible to those who have the password.
Pages vs Posts
Pages and posts have the same appearance. However, if you look closely, you'll notice that they're employed differently. WordPress pages, unlike posts, cannot be organised using tags or categories by default.
Pages help provide static content that does not require social sharing buttons. You don't generally need to share your legal disclaimer page on social media channels, for example. Another distinction between posts and pages is that users cannot comment on pages by default.
Pages can be arranged hierarchically. For example, you can add subpages (child pages) to a page (parent page). However, posts cannot be arranged in a hierarchical sequence.
Let’s move on to Frequently asked questions.
Frequently Asked Questions
What are pages in WordPress?
Pages are for content that isn't time-sensitive or qualifies as "blog content." Pages can be divided into subpages and pages. Pages can use various page templates, such as template files, Template Tags, and other PHP code.
What does the status and visibility section describe?
The status and visibility section describes how and if your page is viewable.
What does password-protected visibility mean?
It makes the page only viewable with a password you choose. Only those with the password can view this page.
Can pages be arranged hierarchically?
Yes, Pages can be arranged hierarchically.
What is the difference between posts and pages?
Pages and posts have the same appearance. However, if you look closely, you'll notice that they're employed differently. WordPress pages, unlike posts, cannot be organised using tags or categories by default.