get_options(); $term = get_queried_object(); $search_enabled = !empty($options['search_enabled']); $primary_color = $options['primary_color'] ?? '#0066ff'; // Get category meta $icon = get_term_meta($term->term_id, '_kng_doc_cat_icon', true); // Get docs in this category $docs_query = new WP_Query([ 'post_type' => \King_Addons\Docs_KB::POST_TYPE, 'posts_per_page' => $options['docs_per_page'] ?? 10, 'paged' => get_query_var('paged') ?: 1, 'tax_query' => [ [ 'taxonomy' => \King_Addons\Docs_KB::TAXONOMY, 'field' => 'term_id', 'terms' => $term->term_id, ], ], 'orderby' => 'menu_order', 'order' => 'ASC', ]); // Get subcategories $subcategories = get_terms([ 'taxonomy' => \King_Addons\Docs_KB::TAXONOMY, 'parent' => $term->term_id, 'hide_empty' => false, 'orderby' => 'meta_value_num', 'meta_key' => '_kng_doc_cat_order', ]); get_header(); ?>

name); ?>

description)): ?>

description); ?>

count, 'king-addons')), $term->count); ?>

term_id, '_kng_doc_cat_icon', true); ?>
name); ?> count, 'king-addons')), $subcat->count); ?>
have_posts()): ?>

    have_posts()): $docs_query->the_post(); ?>
max_num_pages; if ($total_pages > 1): $current_page = max(1, get_query_var('paged')); ?>