get(
'templates/parts/mobile-nav',
[
'mobile_sidebar' => true,
'mobile_toc' => false
]
);
/**
* Breadcrumbs
*/
$view_object->get( 'templates/parts/breadcrumbs' );
?>
%2$s%1$s>', 'h3', $current_category->name ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
'doc_tag',
'field' => 'slug',
'terms' => isset( $current_category->slug ) ? $current_category->slug : ''
]
];
$post_query = betterdocs()->query->get_posts(
[
'term_id' => isset( $current_category->term_id ) ? $current_category->term_id : '',
'term_slug' => isset( $current_category->slug ) ? $current_category->slug : '',
'posts_per_page' => -1,
// phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query -- tag-archive listing requires tax filtering by design.
'tax_query' => apply_filters( 'betterdocs_tag_tax_query', $_tax_query, $current_category )
]
);
$custom_icon = betterdocs()->customizer->defaults->get( 'betterdocs_archive_list_icon' );
$settings_list_icon = betterdocs()->settings->get( 'docs_list_icon' );
if ( ! $custom_icon && $settings_list_icon ) {
$custom_icon = $settings_list_icon['url'];
}
if ( $post_query->have_posts() ) :
?>
-
have_posts() ) :
$post_query->the_post();
if ( $custom_icon ) {
$icon = '
- %s%s ', $icon, //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped esc_attr( esc_url( get_the_permalink() ) ), betterdocs()->template_helper->kses( get_the_title() ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ); endwhile; wp_reset_postdata(); ?>