User Guide

Everything you need to know about Oxygen.

You are here: Oxygen User Guide > Views / Templates
Click here to access our current user guide and video tutorials.
Click the link above. Don't read this article, it's old.

Views / Templates

Note: Since the release of Oxygen 1.4 on March 17th, Views are now called Templates.

Views are a flexible way to apply the same design to multiple pieces of content.

For example, you may have a website with 100 blog posts and 200 WooCommerce products. You'll create a View that will apply to all of your blog posts, and another View that will apply to all of your products. You might want to display products that are on-sale a little bit differently, so you could create another View that only applies to products that are on sale.

You can create views from the Oxygen -> Views page in the WordPress admin panel.

Any time a user visits any page on your site, Oxygen does the following:

1. Check to see if a Custom View applies to that content. If so, render the page using that view.

2. Check to see if any Views have rules that match the requested content. If so, that View is used. If multiple Views could apply, the View with the highest priority order is used.

View Types

1. Single Views

There are many different types of content that can be stored in WordPress - blog posts, Pages, WooCommerce Products, and thousands of other post types. A Single view displays a single post - i.e. one WooCommerce Product, one page, one blog post, etc. Code blocks in single views behave the same way they would in the single.php

2. Archive Views

Archive views display multiple singles. An "Author" archive could display all blog posts by a particular author. A Shop archive could display all WooCommerce products. A "taxonomy" archive could display all content in the specified taxonomies, i.e. all real estate listings that are in the "Rental" taxonomy.

3. Re-Usable Parts

Re-usable parts are things like your site's header and footer that you want to re-use on many pages of your site. You can create a Re-Usable Part out of part of a design you've already created in the DOM Tree by clicking the menu icon for the element and clicking "Make Re-Usable".

4. Special: get_header/get_footer
Some plugins that output extremely customized content, i.e. forums, etc. mostly bypass WordPress themes. They call get_header to get the header of your site, then they do their own thing and output their own content, and then they call get_footer to display the footer of your site. Normally, your site's header and footer are in your theme template files - header.php and footer.php. In Oxygen, you just specify a header and a footer that will be returned by get_header and get_footer here.

Code Blocks

You can execute PHP code using a Code Block component. When using a Code Block in a View, it will behave (mostly) the same way they would if you put them in a template file like single.php, archive.php, etc.

For example, if you create an Archive view that applies to a certain taxonomy, a code block containing the WordPress loop would loop through all the posts inside that taxonomy.

Previewing

When a view applies to multiple pages or archives, you can preview each one from the Preview dropdown in the toolbar. The code in the Code Block will now behave as if an end-user was loading that page on the frontend.

Everyone is switching to Oxygen.

30-Day Money Back Guarantee
Lifetime Updates
World-Class Support
Unlimited Site License
Use On Client Websites
Get Oxygen Now
Note: limited time introductory pricing of $99 expiring soon
The ultimate WYSIWYG visual editor plugin for WordPress.

More flexible than typical page builders and as powerful as hand-coding, Oxygen is quickly becoming the tool of choice for WordPress web designers.

Product

HomeTryFeaturesDesign SetsGet It Now

Learn

SupportLearn OxygenGetting Started GuideVideos

Customers

LoginBlogAboutAffiliates
Copyright © Soflyy
Everything you see here was designed entirely, 100% with Oxygen.
checkmenu-circle