Adding Content to Your Site – Pages and Posts
It’s important to understand the difference between Posts and Pages:
- Pages can be hierarchical and posts are not. Pages can be parent pages and/or children pages and can be many levels deep.
- Posts are ordered by date and pages are not date related. Posts are usually in chronological order with newest first, as in a blog.
If you want a static page, such as the about page, use a PAGE.
If you want a blog post for your blog, use a POST.
If you want to post the latest news, use a POST.
If you want to show your contact information and a map, use a PAGE.
If it’s something that should be linked to from your main menu, use a PAGE.
If it’s about an event, use a POST.
Common Functionality of Pages and Posts
(NOTE: Many of the following options are dependent on the theme or parent theme that you are using. Your theme may add more or less of these types of options. One reason it’s hard to write about WordPress is that it is so extensible and customizable. No two setups are usually alike because of all the different themes, options, plugins, post types, templates, etc. Look more the the generalities of how WordPress works in the following rather than specifics. Your version and setup may be different than others.)
You can add, edit and delete both posts and pages. There is both a posts option and a pages option in the main admin sidebar. You can access the add/edit/delete options from these menu options.
Each has a text edit area for the main content of the page or post. Each has a title area and a slug (the part of the url that leads the visitor to this page such as My Page (title) becomes my-page (slug) and will be in the url as http://my-url/my-page ). The buttons and options in this WYSIWYG editor are similar to other visual text editors. Clicking on the ‘Text’ tab at the top of this window will allow you to edit the HTML/CSS code of the page.
Both pages and posts editors have a screen options tab at the top of the page which will allow you to change what fields and options you see on the editor pages/posts.
Pages and Posts can have a ‘draft’, ‘pending review’ or ‘published’ status. Only certain people with correct permissions will be allowed to see pages or posts with any status other than ‘published’. Publishing your post will allow the public to see the post or page (unless it’s marked as private).
Marking a post or page as private will allow the published version to only be seen by those who are logged in with proper permissions.
A post or page in draft status won’t be seen by anyone until it’s published. However, it saves it so that you don’t lose it. This way you can edit again and post when you are ready for it to be published.
Posts and Pages allow you to create excerpts for display in RSS feeds, or in widgets (we’ll discuss later) as shorter versions or summaries of your page/post. This way visitors can see a preview of the page with a ‘Read More’ button in other areas of your site. If you don’t have an excerpt defined, those areas may just choose the first 200 or so characters from your page/post content instead.
Pages and Posts allow for featured images. These are the main image to go with your content. These featured images are used throughout your site when your post/page is referred to in lists, widgets, etc. Where it will show is dependent on your theme and how it’s set up to show those images.
Posts and Pages have Categories and Tags. We will discuss these more later. For now, just know that these are ways to organize your content and help others search for topics or types of information on your site.
Posts usually have Authors, while pages do not usually show the author information.
Posts and pages have custom fields that can be added. You can use these to add extra information to your posts or pages. The use is beyond the scope of this class.
Posts have ‘Archives’ which are pages that list a group of posts, usually listing the title, featured image and the post/page excerpt with a link to the individual post or page.
Posts usually allow comments whereas pages do not. Comments can be left by the readers about the information in the post. Most themes allow the comments to be threaded.
Pages can have Parent Pages or Children Pages and they can can have a page order. Posts are ordered by date.
Custom Post Types
WordPress allows you to create your own custom post types. This is beyond the scope of this class, but I wanted you to know it’s a possibility.
Custom post types can be used for posts/pages of the same kind with the same custom fields.
For instance, I might want to have a page about each state in the US with the same custom fields for each state (such as state flower, state bird, etc.). I would create a custom post type and add those custom fields to the custom post type.
This would create a new menu item on my left sidebar admin menu for that post type and allow me to add/edit/delete a new state.
Pages and Posts can have different layouts called templates. Each template is a separate file in the theme. You can choose which template is used when you edit the post/page.
Widgets are partial templates that can be placed in certain areas of a page. For instance, you might have a sidebar widget area where you can place different widgets such as a group of links, a small bit of HTML code, an image, a list of categories, etc.
Different themes will provide different widget areas and different widget code that can go in those widget areas. They may have widget areas in the header or footer, or even as call out boxes in the middle of the home page. These widget areas are really just areas that you can choose to fill with different snippets of predefined code.