Introduction to Content Views & CPTs
Latest update: October 24, 2019 | Reading time: 5 to 6 minutesWhat is a Content View?
In practice, content views are all those different page types displayed on your front end. We distinguish our content views based on their role within the website. Therefore, we have:
- Single Post Views ( single post, page and any other post type ),
- Archive Views ( blog, taxonomy, date view and any other post type archive )
- Special Views ( author, search and 404 views )
All content views’ behavior can be managed globally under the Theme Options > Content option panels.
Manage Archive Views
On its basic form, an archive view displays a list of posts. Therefore, a posts archive will display a paginated list of posts ( the classic blog ), a movies archive will display a paginated list of movie posts and so on. So, you can manage your blog under Theme Options > Content > Archive Views: Posts. Using these options you can manage:
- The headings look and content via the Headings Group section
- The list layout and how each post listing is displayed via the Post Listings & Sidebar section
- The pagination settings via the Post Listings Pagination section
Manage Special Views
As mentioned above, the special views include the Author, Search and 404 pages. Author and Search views have similar functionality with the rest of the archive views ( check previous segment ), while for the 404 page you can change the text and images displayed.
Manage Single Views
The majority of the pages composing a website are single post views. Single post views hold all the different content of your web project, therefore we always advise you to pay close attention before start working with them.
All single post views’ behavior can be managed globally under the Theme Options > Content > Single View: { Post name } option panels. Apart from global options, there are also the Page Options which are available on each single post edit screen, making it easy for you to override a global option on a specific post. In order to avoid any misunderstandings on the way the global > per post option system works, please pay attention to the following examples:
Example 1: Working with new posts
Let’s say that you need all your new single posts to have a left sidebar, all you have to do is visit the Theme Options > Content > Single View: Post > Editor Content & Sidebar section and set your left sidebar layout. After that, all single posts you create will have by default a left sidebar layout. If for some reason, you need a different layout for a specific post, you should visit its edit screen, locate the Page Options box and modify the layout under the Content > Editor Content & Sidebar section.
Example 2: Working with existing posts
Let’s say that you have already created 20 posts. All have the default left sidebar layout configuration, except 3 special posts that you needed without a sidebar. Suddenly, you decide that a right sidebar layout would fit better with your design. All you have to do is pay another visit to Theme Options > Content > Single View: Post > Editor Content & Sidebar section and set the new right sidebar layout. This is how it will affect your existing and new posts:
- The 17 posts with left sidebar will be updated with the new right sidebar layout set by global options.
- The 3 special no sidebar posts will remain as is, since we have saved them with special per post settings
- All new posts will have a right sidebar layout by default.
Working with your own Custom Post Types
If you are working with a demanding project, you might find it necessary to add your own custom post types. Even if it is quite easy to create a custom post type manually or via a plugin, usually you might find it difficult to manipulate the looks of it on the front end. This is not the case here since our theme recognizes your custom post type and automatically creates a dedicated options panel for it.
So, let’s say that you’ve just created a custom post type named movie and you’ve configured it to produce an archive view too. Now just visit Theme Options > Content and you will see the following nested tabs added:
- Single View: Movie
- Archive Views: Movies
The options included on these tabs as long as the front end view, both follow the functionality of the WordPress native post type. Other than that, these views are working in the same way as the rest of the post types do.