Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Register Custom FAQ view file via a filter
add_filter('my_custom_faq_view', 'my_custom_faq_view_filter', 10, 1);
function my_custom_faq_view_filter($slugs = array())
// set the location of the faq file to a sub directory in the child theme folder.
$slugs['my_custom_faq_slug'] = get_stylesheet_directory() . '/resources/views/my-custom-faq-file.php';
return $slugs;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment