Skip to content

Instantly share code, notes, and snippets.

@mrkdevelopment
Created April 26, 2017 05:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrkdevelopment/37127ae7f3612263d3c1c0333492171b to your computer and use it in GitHub Desktop.
Save mrkdevelopment/37127ae7f3612263d3c1c0333492171b to your computer and use it in GitHub Desktop.
Register Custom FAQ view file via a filter
<?php
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