| @@ -21,8 +21,12 @@ | ||
| 21 | 21 | 'post_query' => $post_query, |
| 22 | 22 | 'docs_list_title_tag' => isset( $_params['docs_list_title_tag'] ) ? $_params['docs_list_title_tag'] : 'h2' |
| 23 | 23 | ] |
| 24 | 24 | ); |
| 25 | + // Nested subcategories — emitted here (not inside the shared leaf template, | |
| 26 | + // which the block and Customizer archive layouts also use) so it stays | |
| 27 | + // scoped to this widget. Sibling after the grid, so it is not a grid cell. | |
| 28 | + $view_object->get( 'template-parts/archive-nested-categories', $_params ); | |
| 25 | 29 | } elseif ( isset( $_params['query_args'] ) ) { |
| 26 | 30 | $post_query = new WP_Query( $_params['query_args'] ); |
| 27 | 31 | $view_object->get( |
| 28 | 32 | 'template-parts/archive-doc-list', |
| @@ -30,8 +34,10 @@ | ||
| 30 | 34 | 'post_query' => $post_query, |
| 31 | 35 | 'docs_list_title_tag' => isset( $_params['docs_list_title_tag'] ) ? $_params['docs_list_title_tag'] : 'h2' |
| 32 | 36 | ] |
| 33 | 37 | ); |
| 38 | + // Nested subcategories for Layout 2 (scoped to this widget — see above). | |
| 39 | + $view_object->get( 'template-parts/archive-nested-categories', $_params ); | |
| 34 | 40 | } |
| 35 | 41 | |
| 36 | 42 | if ( isset( $pagination ) && $pagination ) { |
| 37 | 43 | $current_term = isset( $edit_mode ) && $edit_mode && isset( $widget_type ) && $widget_type == 'elementor' ? Helper::get_highest_docs_term() : ( isset( $_params['term'] ) ? $_params['term'] : '' ); |