Creating Dynamic Content with Advanced Views (AVF) and Custom Fields

Creating Dynamic Content with Advanced Views (AVF) and Custom Fields

Last updated: February 27, 2025
display dynamic content with avf in wp
dynamic content for wp websites (2)

Introduction:

Creating dynamic content is essential for modern websites, as it allows for greater personalization, engagement, and scalability. In this article, we’ll explore how to create dynamic content using Advanced Views Framework (AVF) and Custom Fields in WordPress. Plus, we’ll show you how to combine this powerful setup with page builders like Avada Builder, Elementor or WPBakery to create visually stunning and flexible pages without coding.

What are Advanced Views Framework (AVF) and Custom Fields?

Advanced Views Framework (AVF) is a standalone plugin created by WPLake, designed to help you display custom field data from ACF, Metabox, Pods, and other built in post fields on the front-end of your WordPress site. AVF allows you to create and manage custom templates for displaying dynamic content based on custom fields, posts, and custom post types (CPTs).

Custom fields, like those created using ACF (Advanced Custom Fields), store additional data related to your posts or pages—such as extra text, images, dates, and more. When combined with AVF, this data can be displayed in various layouts and in Pro, sliders without coding.

Blog post fields in an AVF View as a splide slider.
Blog post fields in an AVF View as a splide slider.

The Power of Dynamic Content

Dynamic content refers to content that changes based on the page being viewed or the context in which it is displayed. Unlike static content, which remains the same across all pages, dynamic content adapts to factors such as post type, custom fields, user interactions, or query parameters.

For example, in a blog post, dynamic content can include the author’s bio, publication date, or custom metadata (e.g., tags, categories), ensuring that each post displays relevant information automatically. In a listing page, it could mean pulling data from custom fields to generate unique layouts for each entry.

A dynamic content section for CPT Itinerary
A dynamic content section for CPT Itinerary, displaying post title, ACF fields for from and to and duration and relationship fields for accommodation and taxonomy, with a ACF Gallery field in a image slider.

Integrating Advanced Views Framework (AVF) and Custom Fields for Dynamic Content

To display dynamic content using Advanced Views Framework (AVF) and custom fields (ACF, MetaBox and Pods fields), follow these steps:

1. Create Custom Fields with ACF:

  • In the WordPress dashboard, navigate to ACF > Field Groups.
  • Create a field group by adding fields such as text, image, or select dropdowns. You can create different field types depending on the data you want to display dynamically (e.g., Text, Image, WYSIWYG, Date Picker, etc.).
  • For example, for a product page, you could create custom fields like Delivery time, Booking Date, and Distributor website.
  • Save the field group, and assign it to the posts, pages, or custom post types (CPTs) where you want these fields to appear (e.g., Product Post Type) using the field group Location Rules.
Extra product fields for Woo Products using ACF.
Extra product fields for Woo Products using ACF.

2. Add Custom Fields to Posts/Pages:

  • After creating your custom fields, navigate to the relevant product, post, page, or custom post type (CPT) where you’d like to use these fields.
  • You’ll now see the custom fields in the post editor. For example, for a product, you can fill in the Delivery time, Booking date, and Distributor website fields with the relevant data.
Filled ACF Woo Product fields on Product page.
Filled ACF Woo Product fields on Product page.

3. Create a View Template with AVF:

  • Use the Advanced Views Framework (AVF) to design a custom template that will display your dynamic content. In AVF, you can create a custom template where you map the custom fields (such as Delivery time, Booking date, Distributor website) to the front-end layout.
  • You can use the shortcode to display custom field values in the template.

Here’s how-to Create a View for Woo Custom fields

  • In the WordPress backend, visit Advanced Views Framework tab > Views and then “Add New View”, give your View a descriptive Name, and “Add Field” to assign the Woo Product custom fields from ACF. Publish your View and copy the shortcode and paste it in your Product template.
Use AVF to display custom Woo Product fields.
Use AVF to display custom Woo Product fields.

4. Display Dynamic Content on the Front-End:

  • Once your View template is set up in AVF, and the shortcode is place on your Woo Product Template then the dynamic content will be displayed on the front-end by pulling in the data from the custom fields. This allows you to present personalized or varying content without needing to hardcode it into your theme files.

Why Advanced Views Framework (AVF) Works Well with Page Builders

Page builders like Avada Builder, Elementor and WPBakery are great for designing beautiful pages without writing code. However, when combined with Advanced Views Framework (AVF), these page builders become even more powerful.

Page builders give you full control over the design and layout of your pages. When integrated with AVF, you can easily add dynamic content into your page builder’s layouts using widgets, shortcodes, or dynamic tags. This combination allows you to create fully customizable, dynamic websites that are still easy to manage.

Example Use Cases

1. Real Estate Listings

For a real estate site, you can create custom fields for property details like price, square footage, and location. With AVF, you can display these details in a custom property listing layout. Page builders like Avada Builder or Elementor can help you design the property grid and display the custom fields dynamically.

2. Portfolio Showcases

Using AVF, you can create custom fields for portfolio items, including the project description, technologies used, and images. These fields can be displayed dynamically in a portfolio grid layout designed with your page builder.

Portfolio showcase in a grid layout using AVF View and Card.
Portfolio showcase in a grid layout using AVF View and Card.

3. Event Listings

For an events site, use AVF to display dynamic event data like date, time, and location. You can design a custom event listing template using a page builder, and use AVF to pull in the event details dynamically.

Best Practices for Optimizing Dynamic Content

Here are some tips for optimizing your dynamic content:

  • Use Caching: Dynamic content can slow down your site, so make sure to use caching plugins like W3 Total Cache to speed up your pages.
  • Optimize Queries: Ensure that your queries are optimized to retrieve only the necessary data. This can help reduce load times, especially when working with large datasets, Note AVF already has this built in.
  • Lazy Load Images: For pages with many images, consider enabling lazy loading to improve initial load time.

Conclusion

Combining Advanced Views Framework (AVF) with custom fields and a page builder allows you to create dynamic, engaging websites that adapt to user needs. This powerful combination gives you the flexibility to design beautiful layouts while still displaying personalized, data-driven content.

Start using AVF with your favourite page builder to enhance your website’s functionality and design!

In this article