How to write a custom view for an FAQ Layout

Yes, we need to write a filter which will add a view “slug” as shown the in example below. This code can either be written in a custom plugin or the functions.php file of your theme (or child theme if you are using a third party theme).

This user-defined slug will show up in your divi faq modules when you select “Has Custom View” and then select an option from “Select Custom View”. Below is the screenshot for the same.

If you are using a direct shortcode, the following sample code can be used.

 

[df_faq_framework include_categories=” view_slug=’my_custom_faq_slug’ question_class=” answer_class=”]

 

Sample view file shown below. The variable $attrs will be available in the view file which will be attributes from the shortcode or the divi faq module.

30 day Money Back Guarantee

30 day Money Back Guarantee

If you aren't happy with our products, you get your money back. No questions asked.
Full Support on Every Product via our Helpdesk

Full Support on Every Product via our Helpdesk

Excellent documentation and dedicated support are all part of the service
Secure using Stripe and PayPal

Secure using Stripe and PayPal

We take your security seriously and have every page secured via SSL on our site.

We Offer both PayPal and Stripe for Payment.

Subscribe

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!