File: /var/www/html/wp-content/themes/polygant_2023/page.php
<?php get_header('new'); ?>
<?php
$cur_id = get_the_ID();
$query = new WP_Query(array(
'post_type' => 'page',
'post_per_page' => -1,
'status' => 'publish'
));
?>
<section class="page">
<div class="container">
<div class="row">
<div class="col-md-3">
<a href="#" id="toggleShowPages" class="toggleShowPages hidden-md hidden-lg"><?php echo __('Show page', 'polygant'); ?></a>
<?php if ($query->have_posts()) : ?>
<div id="showPages" class="pageSidebar">
<ul class="sideMnu">
<?php while ($query->have_posts()) : $query->the_post(); ?>
<li>
<a href="<?php echo get_the_permalink(get_the_ID()); ?>" class="<?php if($cur_id == get_the_ID()) : ?>current_page<?php endif; ?>"><?php the_title(); ?></a>
</li>
<?php endwhile; ?>
</ul>
</div>
<?php wp_reset_postdata(); ?>
<?php else : ?>
<p><?php esc_html_e('Sorry, no posts matched.'); ?></p>
<?php endif; ?>
</div>
<div class="col-md-9">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="theContent">
<?php the_content(); ?>
</div>
<?php endwhile; endif; ?>
</div>
</div>
<!-- row -->
</div>
<!-- container -->
</section><!-- page -->
<?php get_footer('new'); ?>