PMC FAQ
Adds an FAQ meta box and to post edit. Use the [pmc-faq] shortcode to display.
Configurations
-
Use the
pmc_faq_templatefilter to use another template. Variables within template are$title(string),$description(string), and$questions(array). -
By default, only the
postpost type is enabled to use the FAQ. To include other post types, use thepmc_faq_post_typesand include post type within array. -
After the content filter has run, the
is_faq_shortcode_in_contentwill tell you if the[pmc-faq]shortcode is contained within the post content. You can use this property to include the shortcode if is not contained in the content.
Example
<?php
// If pmc-faq shortcode is not in the content, add it below.
if (
class_exists( '\PMC\FAQ\Utility' )
&& empty( PMC\FAQ\Utility::get_instance()->is_faq_shortcode_in_content )
) {
echo do_shortcode( '[pmc-faq]');
}
?>