Now is your last chance to buy a lifetime license before we switch to annual pricing. Existing licenses will be unaffected.
read more
docs PHP, CSS & JS

Singular & Archive Templates

Singular templates display one item at a time - for example one post, one page, or one instance of a custom post type.

For example, a Singular template would be used to display the following:

  • A blog post
  • A page
  • A WooCommerce product

Archive templates are used to display many items on the same page.

For example, an Archive template would be used to display the following:

  • A paginated list of all your blog posts
  • A paginated list of all your WooCommerce products
  • A paginated list of all your blog posts in a particular category

Singular Templates

On the Oxygen -> Templates -> Edit screen, the options for Singular templates are in the Singular subsection under Where Does This Template Apply?

You can apply the template to:

  • All Post Types
  • Posts
  • Pages
  • Any Custom Post Types present on your site

Filtering Options

  • only apply if taxonomized as all of the following - instead of applying the template to all instances of the checked post types, it will only be applied to instances taxonomized as specified
  • only apply if parent ID is one of the following - instead of applying the template to all instances of the checked post types, it will only be applied if the instance's parent ID matches one of the specified IDs

Archive Templates

On the Oxygen -> Templates -> Edit screen, the options for Archive templates are in the Archive subsection under Where Does This Template Apply?

You can apply the template to:

  • All archives
  • Taxonomy archives for the specified taxonomies
  • Post Type archives for the specified post types
  • Author archives for the specified authors
  • Date archives

Further Reading

What is a custom post type?

WordPress can store and display numerous types of content - blog posts, pages, products, and much more. The two main post types that are default with WordPress are Post, and Page. Additional post types can be added to your site by you and the plugins that you install. For example, the WooCommerce plugin adds a Product custom post type. Plugins for real estate listings often add a Property Listing custom post type.

https://codex.wordpress.org/Post_Types

What is a taxonomy?

Taxonomies are ways of categorizing or tagging content. For example, you may have a shoe store with multiple product categories, e.g. men's shoes, women's shoes, boys shoes, girls shoes. You may have a real estate website with multiple listing types, e.g. for rent, for sale, off market, foreclosure. You may have a car dealership website with cars categorized by their condition: new or used.

Product categories, list types, and car condition are all examples of taxonomies.

https://codex.wordpress.org/Taxonomies

Oxygen replaces the WordPress template hierarchy

Normal WordPress themes rely on template files placed in /wp-content/themes/ to display the content on your site. Oxygen simply provides a visual replacement for the normal WordPress template hierarchy, allowing you to design every part of your site visually, inside WordPress, without requiring a theme or any theme files.

https://developer.wordpress.org/themes/basics/template-hierarchy/

Last modified: June 24, 2020
Copyright © 2024 Soflyy
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram