Created
April 26, 2017 05:05
-
-
Save mrkdevelopment/37127ae7f3612263d3c1c0333492171b to your computer and use it in GitHub Desktop.
Register Custom FAQ view file via a filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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