DEV Community

Cover image for How to create an FAQs page - P2 - Using Meta Box and Oxygen
WP Meta Box Plugin
WP Meta Box Plugin

Posted on

How to create an FAQs page - P2 - Using Meta Box and Oxygen

In the previous part of the series 'Creating an FAQs Page', we introduced you to do it with Meta Box and Elementor. As promised, we are going to show you another method that uses Meta Box and another page builder, Oxygen.

The image below is a specific example:

Example of an FAQs page

Video Version

https://youtu.be/K0F-Mbiz_ls

Before Getting Started

The FAQs Page contains questions and answers that are saved in the custom fields created with Meta Box. They are also displayed in an accordion style on the page.

To get started, we need the Meta Box core plugin to have the framework for creating custom post types and custom fields. It’s free, and you can download it directly from wordpress.org.

To have a UI for creating custom fields right on the back end, we also need Meta Box Builder. You can install this extension individually or use the Meta Box AIO.

Next is Oxygen Builder. You should use its 3.9 version or higher, which has native integration with Meta Box.

Finally is OxyExtras, which provides the accordion style and adds schema for the FAQs page. But it is optional. If you don't have the Oxy Extras, you can still build the page with Oxygen and create schema with other plugins, such as Slim SEO Schema.

Step 1: Create a New Page

Go to Pages > Add New.

Create a new page

Step 2: Create Custom Fields

Go to Meta Box > Custom Fields > Add New. I’ll add a group with 2 subfields inside. It is also set to be cloneable to have more spaces to add different questions and answers.

Create custom fields

Then, there'll be an Add More button to allow adding more Q&A on the FAQs page like this.

Click Add more button to add more Q&A on the FAQs page

In addition, I set this group as Collapsible to collapse the information in the group field.

Set group to be Collapsible to collapse the information

It’ll help avoid being messy.

The information is displayed in a tidy way

After creating all the fields, move to the Settings tab, choose Location as Post type and select Page. Since we created the fields for the FAQs page, go to the Advanced location rules section below and select the page name.

Set Location for the created fields as post type

Back to the page editor, you will see the fields and can now fill in information about questions and answers.

The fields appear in the page editor

Step 3: Create a Template with Oxygen

In Oxygen, create a template and choose the inactive - Default Page option to inherit its style and choose to apply this template for Pages.

Create a template with Oxygen

Back to the FAQs page, assign the created template to this page in the Render Page Using Template section.

Assign the created template to the FAQs page

Now, let’s edit the template with Oxygen.

In the Previewing section, choose the page you want to see in the preview. Then, select a Section component to contain all of the FAQ information.

Choose the page you want to see in the preview

Next, add the Pro Accordion component. This component will only be available when you have Oxy Extras on your site.

Add a Pro Accordion component

Since I used Meta Box custom fields to save the FAQs information, I set the Accordion type as Accordion - Dynamic Items (Meta Box).

Set Accordion type as Accordion - Dynamic Items (Meta Box) to save the FAQs information

In the Dynamic Data section, you can input the value to show the questions and answers.

Go to the Dynamic Data section

Input parameters to show the Q&A

The group we used in this tutorial is cloneable, so add the group's ID into the box which I marked as 1 in the picture above.

The question will be the Header Text, so I added the Question field's ID in the box which I marked as 2. For the answers, I also input the ID of the Answer field and set it in the Content field box, which is marked as 3.

After applying the parameters, you will see all the questions and answers displayed in the preview.

All the questions and answers display in the preview

Normally, to have a better score for SEO, the FAQs page should have schema markup.

The Oxy Extras supports the FAQ schema feature. Just go to the Advanced section to enable the FAQ Schema Markup.

Go to the Advanced section of the accordion

Enable the FAQ Schema Markup in the Advanced section

If you haven’t had the Oxy Extras, you can try the Slim SEO Schema to have the FAQ Schema following this tutorial.

Finally, click the Apply Params button to end the setup.

To end up the setup, click Apply Params

Now, on the FAQ page, you will see result like this.

Result of the created FAQ page after all steps

Last Words

It looks so simple to create an FAQs page using Meta Box and Oxygen, right? With custom fields, you can easily save questions and answers even if you are not tech-savvy. Keep up with our channel for further examples with other page builders!

Top comments (0)