Advanced Views Docs
Live PlaygroundDownload PluginGet PRO
  • 💡Help Centre
  • ⚡Getting Started
    • Introduction
      • Key Aspects
      • Creating Your First View
      • Creating Your First Card
      • Plugin Terms
      • Plugin Interface
        • Field Options
    • Installation
      • Advanced Views Lite
      • Advanced Views Pro
      • Comparison Table
      • Upgrading from Lite to Pro
    • Supported data vendors
    • Starter theme
  • 🌟Display Content
    • WordPress
      • Post
      • Taxonomy terms
      • User
      • Comments
      • Menus
    • WooCommerce Product
    • Meta fields
      • Basic fields
        • Number
      • Content fields
        • Image
        • File
        • WYSIWYG
        • oEmbed
        • Gallery
      • Choice fields
        • Select/checkbox/radio
        • True / False
      • Relationship fields
        • Link
        • Post_object
        • Page Link
        • Relationship
        • Taxonomy
        • User
      • Advanced fields
        • Google Map
        • Google Map Multiple Markers
        • ACF OpenStreetMap Field
        • Date/time picker
      • Layout fields
        • Group (Pro)
        • Repeater (Pro)
        • Flexible (Pro)
    • Object fields
    • Custom Data (Pro)
    • Custom Gutenberg Blocks (Pro)
    • Mount Points (Pro)
    • Front-end assets management (Pro)
  • 🦸‍♂️Query Content
    • Basic Filters
    • Meta Filters (Pro)
      • Current Post
      • Comparison
      • Dynamic Injection
    • Taxonomy Filters (Pro)
    • Pagination (Pro)
    • Custom Data (Pro)
  • 🏆Shortcode Attributes
    • Common Arguments
    • View Shortcode
    • Card Shortcode
  • 🧙‍♂️Templates
    • Customizing the Template
    • Template engines
      • Twig
      • Blade
    • CSS & JS
      • BEM Methodology
      • WordPress Interactivity API
    • File system storage
    • Pre-built components
    • Reusable components library (Pro)
    • Live reload
    • Multilingual
    • Custom Ajax & Rest API (Pro)
  • ☕Guides
    • Display Custom Post Type (CPT) on another post
    • Display Employees (CPT) of a Company (CPT)
    • Display Nested Repeater Fields
    • Map Marker from ACF Image
    • Display all CPT items on a single map
  • 🛠️Tools
    • Export/Import
    • Demo Import
    • Settings
    • Preview
  • 🏹Troubleshooting
    • Compatibility
    • Report a bug
    • Payment Issues
    • Lite Support (Forum)
    • Pro Support
  • ⚙️Customization
    • Filters and Hooks
      • View
      • Card
    • Suggest a feature
    • Performance
Powered by GitBook
On this page
  • 1. Main components
  • 2. Integration approaches
  • 3. "View" component
  • 3.1) Built-in data binding
  • 3.2) Automated template generation
  • 3.3) Seamless data connection
  • 3.4) Object and multi-level fields support
  • 3.5) Benefits over the default approach
  • 3.6) Supported data vendors
  • 4. "Card" component
  • 4.1) Item layout
  • 4.2) Extra query arguments and template variables
  • 5. Modular approach
  • 6. Core component aspects
  • 7. Front-end assets management
  • 8. Reusable components
  • 9. Framework reliability and performance

Was this helpful?

  1. Getting Started
  2. Introduction

Key Aspects

PreviousIntroductionNextCreating Your First View

Last updated 1 month ago

Was this helpful?

Advanced Views is a specialized WordPress framework designed to enhance and customize content display and functionality.

It can be used independently (see our ) or in conjunction with your preferred theme or builder.

Advanced Views (AVF) is a versatile and flexible tool that sets itself apart from drag-and-drop builders. Thanks to its straightforwardness and simplicity, AVF can be used by web creators and website owners for a range of simple tasks. Mastering advanced layouts requires at least basic HTML and CSS knowledge, while employing all the features of the framework requires PHP and JS knowledge.

Below we provide an overview of the key aspects of Advanced Views. If you're completely new, check out our .

1. Main components

The Advanced Views plugin enhances the default WordPress content querying and display process by introducing two new components:

  1. View This is a smart template responsible for displaying content.

  2. Card This instance handles the database query and the layout of result items.

2. Integration approaches

Views and Cards define rules but do not specify where to apply them. To render a View template or perform a Card query, you must call these instances in the target locations.

There are two ways to add a View or Card to a target location:

  1. By using the instance-related shortcode This option can be utilized in various contexts. You can find the instance-related shortcode in the right panel of the View or Card settings. By using View and Card , you can specify the data source and restrict visibility based on user roles. Note: If you plan to include the shortcode in your code, such as in PHP theme templates, you can use provided by Advanced Views instead of the default do_shortcode approach. This approach will make your code more readable and save you from having to remember all available arguments.

  2. By using the This option is exclusively available for Pro users and can be used within the Gutenberg editor. It allows you to add Gutenberg blocks to your library without requiring . We recommend using this method on pages that support Gutenberg for the following reasons: a) Improved performance Block data is stored within the current Post content and does not trigger additional meta queries, resulting in better performance. b) Reusability Unlike meta field groups, blocks can be used multiple times on the same page, enhancing reusability.

3. "View" component

A View is a smart template responsible for displaying content. It establishes connections between object fields in the database and their presentation in the display template.

When you select specific fields, View automatically inserts the necessary lines to display them within the current template.

3.1) Built-in data binding

View handles all data conversions in the background.

3.2) Automated template generation

3.3) Seamless data connection

View establishes connections between object fields in the database and their presentation in the display template. This feature is especially useful when you work with fields from meta vendors (like ACF).

When you change the field type or field settings in the Field Group, which would require template changes, you'll be notified about the affected templates. In addition to that, in the list table, you have the 'bulk validation' tab, which allows you to validate all the custom templates in one place.

Moreover, Advanced Views displays information about 'related' data. So, on your View screen, you can see the list of used Field Groups, and vice versa, on the Field Group screen, you can see a list of Views where the current group fields are used.

3.4) Object and multi-level fields support

3.5) Benefits over the default approach

Automatic template generation and data conversion provide a solid foundation, saving you from starting entirely from scratch.

These time-saving features allow you to focus on what truly matters, rather than manually typing markup, retrieving data from the database, converting it to the correct formats, and injecting it into the template.

3.6) Supported data vendors

4. "Card" component

Card is an instance responsible for the DB Query and result item layout.

4.1) Item layout

At the same time, Card contains the display template for the result items. While the items layout is responsible for the list/grid/other appearance, Card doesn't define the look of each individual item inside.

View is responsible for the layout of the individual item, and every Card has a View attached, which is used inside the loop to display every single item of the results. Similar to the View, Card's template is also automatically generated and can be easily customized.

4.2) Extra query arguments and template variables

5. Modular approach

View and Card components are modular, which means Advanced Views encourages you to have several independent layouts rather than one large, complex one.

Let's say we need to display specific posts with detailed information about their authors and categories. Instead of having one complex layout, the architecture of Advanced Views pushes you to:

  1. Create a Card for the query and items layout

  2. Create a View for the item display, which will display Post fields and contain 2 extra Views:

  • View for author info display

  • View for category info display

In this way, each component is relatively small and independent. Each has its own CSS. While creating and editing, you don't have to deal with overly complicated layouts, and you can easily keep a clear picture of the current layout in your mind.

Thanks to the features of the Advanced Views plugin, creating these components is even faster than creating one big layout. As a result, you get independent and reusable items that are easy to modify and use in other places.

6. Core component aspects

View and Card serve different purposes, but both share core features that are identical in both cases. Here are these core items:

6.1) Components storage

Views and Cards store their settings in JSON format, and there are two storage options available: Database and File System.

Database (Default Storage)

Items are stored in the wp_posts table, and their JSON settings are stored within the post_content column.

File System

6.2) Integrated Template engine

6.3) Automatic template validation

When you save a View or Card, the framework performs automatic template validation (by passing dummy data). If there are any template issues, you'll see them right away.

6.4) BEM methodology and Tailwind support

6.5) Web Components and WordPress Interactivity API

7. Front-end assets management

Advanced layouts, such as sliders, masonry grids, or galleries, require the use of JavaScript libraries.

8. Reusable components

Reuse is a fundamental aspect that empowers developers to create advanced functionalities without investing excessive time in implementation.

Views and Cards are modular, making them ready for reuse out-of-the-box.

Pre-built components

Your own reusable components

You can easily reuse Views and Cards that you've crafted for one website on multiple others.

9. Framework reliability and performance

Advanced Views is a lightweight and reliable tool with excellent performance. The framework not only encourages best practices but also adheres to them.

For instance, when you choose the 'Featured image' field of a Post, which is represented as an ID (integer) of an Image (Attachment) , View automatically adds an "img" tag to the template, complete with all the required properties. During rendering, View retrieves the ID of the specified Featured Image, gathers all the necessary properties, and seamlessly integrates the data into the template.

View employs the (or ) template engine and generates high-quality, unique markup tailored to your needs, based on the field types and names of the selected fields. In simple cases, you won't need to modify the generated markup at all. For more complex layouts, you may need to make adjustments to achieve your desired appearance.

Advanced Views supports object fields (like Post.Author or ACF Relationship) and multi-level fields (like ACF Repeater).

Advanced Views natively supports WordPress object fields, WooCommerce, and several meta vendors, like Advanced Custom Fields. You can find the full supported data vendors list .

Advanced Views doesn't limit you to the vendors listed there. You can pass any data, including data obtained from any API, to the template using the .

Under the hood, it's a wrapper above the built-in WordPress '' class. It provides a user interface for query arguments with descriptions, so you don't have to spend time looking for the right names and values.

Card contains the main arguments. If you need to include advanced arguments in the Query that are missing in the user interface, or add extra arguments to the template, you can do it using the .

Items are stored as files inside the current theme directory. Code fields have separate files. This option is preferable if you use Git, work with IDE, or want to utilize TypeScript/Sass/Tailwind in your development workflow. You can read more about the File system storage option .

The Advanced Views plugin comes with built-in integration for both and . You can use your preferred template engine and have full control over the layout of Views and Cards.

If you're new to template engines, you can read about why these options are better than the default PHP templates and choose the best one for your project .

The Advanced Views framework follows the for class naming out-of-the-box. If you prefer , you can disable the class generation and enable the to for View and Card templates.

Every View and Card may have its own JS code. The Advanced Views Framework allows you to employ or without any extra actions.

In the Lite edition, you need to download and as usually, while the Pro edition offers for these scenarios and brings for Views and Cards.

Advanced Views Pro comes with a set of pre-loaded JS libraries. In addition to the libraries themselves, Advanced Views knows their markup requirements and the minimal configuration they need. This allows you to easily incorporate these libraries into your Views and Cards without any hassle.

Advanced Views comes with a set of for a quick start. These include meta fields, tuned markup, and primary CSS rules, including responsive, so you do not need to start from scratch.

In the Lite version, you can use Import/Export tools, or enable the and copy/paste selected items to any other installations.

With Advanced Views Pro has in addition support for Git repositories, allowing you to create and push/pull items to the library directly from the plugin's UI.

The is modular, follows , covered by tests, and validated using and tools.

Performance optimization is a top priority. For instance, View and Card settings are stored as JSON instead of using post meta, which contributes to the framework's excellent performance. You can find and repeat our , which showcase the framework's strong performance.

⚡
starter theme
introduction to the framework
shortcode arguments
the special class
instance-related Gutenberg block
React knowledge
in the database
Twig
Blade
Read more
here
View Custom Data feature
WP_Query
WP_Query
Card Custom Data feature
here
Twig
Blade
here
Read more
pre-built components
FS mode
your own component libraries
framework's codebase
WordPress Coding Standards
php_codesniffer
phpstan
performance tests
BEM methodology
File system storage
WordPress Interactivity API
simplified assets management
Ajax support
Tailwind
employ Tailwind
Web Components
employ JS libraries in templates