Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Example functions that use the new ability to filter the
- // display_all_answers and group_by_category settings for
- // the View.FAQs class in the Ultimate FAQs plugin.
- // Can be inserted in your theme's functions.php file.
- // The following disables the display_all_answers setting,
- // so you can, for example, have a single FAQ start as closed.
- function disable_display_all( $display_all ) {
- return false;
- }
- add_filter( 'ewd_ufaq_display_all_answers', 'disable_display_all' );
- // The following enables the group_by_category setting,
- // so you can, for example, have the category heading show
- // even if you have just a single FAQ being output.
- function enable_group_by_category( $group_by_category ) {
- return true;
- }
- add_filter( 'ewd_ufaq_group_by_category', 'enable_group_by_category' );
Advertisement
Add Comment
Please, Sign In to add comment