| @@ -3,9 +3,10 @@ | ||
| 3 | 3 | |
| 4 | 4 | if ( ! defined( 'ABSPATH' ) ) { |
| 5 | 5 | exit; |
| 6 | 6 | } |
| 7 | -$faq_terms = get_terms( betterdocs()->query->faq_terms_query_args() ); | |
| 7 | +$_faq_taxonomy = isset( $shortcode_attr['faq_taxonomy'] ) ? sanitize_key( $shortcode_attr['faq_taxonomy'] ) : 'betterdocs_faq_category'; | |
| 8 | +$faq_terms = get_terms( betterdocs()->query->faq_terms_query_args( '', '', [], $_faq_taxonomy ) ); | |
| 8 | 9 | |
| 9 | 10 | if ( $enable && $have_posts && ! empty( $faq_terms ) ) { |
| 10 | 11 | // Only use settings value if faq_schema is not already set in shortcode attributes |
| 11 | 12 | if ( ! isset( $shortcode_attr['faq_schema'] ) ) { |