<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
<?php
/**
 * Docs archive loop articles template
 *
 * This template can be overridden by copying it to yourtheme/documentor/archive/loop-articles.php.
 *
 * @author  softaculous
 * @package documentor/Templates
 * @version 1.0.0
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

// phpcs:disable
$show            = documentor()->get_option( 'show_articles', 'documentor_archive', true );
$articles_number = intval( documentor()->get_option( 'articles_number', 'documentor_archive', 3 ) );

if ( -1 === $articles_number ) {
    $articles_number = 9999;
}

if ( ! $show || $articles_number < 1 ) {
    return;
}

$top_articles = new WP_Query(
    array(
        'post_type'      => 'docs',
        'posts_per_page' => -1, // phpcs:ignore
        'post_parent'    => get_the_ID(),
        'orderby'        => array(
            'menu_order' => 'ASC',
            'date'       => 'DESC',
        ),
    )
);
$parent_link  = get_permalink();

$count = 0;


$nav_list = wp_list_pages(
	array(
		'title_li'  => '',
		'order'     => 'menu_order',
		'child_of'  => $show_parents ? 0 : documentor()->get_current_doc_id(),
		'echo'      => false,
		'post_type' => 'docs',
		'walker'    => new Documentor_Walker_Docs(),
	)
);
if ( $nav_list ) {
	$show_childs = documentor()->get_option( 'sidebar_show_nav_childs', 'documentor_single', false );
                    ?>
	<div class="home_page_cats slimscroll-virt">
		<ul class="documentor-nav-list<?php echo ( $show_childs ? ' documentor-nav-list-show-childs' : '' ); ?>">
			<?php echo $nav_list; // WP XSS OK. ?>
    </ul>
	</div>
<?php } 
wp_reset_postdata(); ?>
