File: /hosting/kak.bg/web/wp-content/themes/Primero/page.php
<?php get_header(); ?>
<?php
if(have_posts())
while(have_posts()):
the_post();
?>
<?php if (function_exists('progression_breadcrumbs')) progression_breadcrumbs(); ?>
<div class="content-container">
<div class="sidebar-container container-<?php echo of_get_option('sidebar', 'right'); ?>">
<div class="page-content content-sidebar<?php if(of_get_option('sidebar', 'right') != 'right') echo '-'.of_get_option('sidebar', 'right'); //if statement needed to avoid css layout issues ?>">
<?php
if($post->post_parent) {
$children = wp_list_pages('sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&depth=1&echo=0');
}
else {
$children = wp_list_pages('sort_column=menu_order&title_li=&child_of=' . $post->ID . '&depth=1&echo=0');
}
if ($children) { ?>
<ul class="sub-pagination">
<?php if($post->post_parent): ?>
<li><a href='<?php echo get_permalink($post->post_parent); ?>'><?php echo get_the_title($post->post_parent); ?></a></li>
<?php else: ?>
<li class="current_page_item"><a href='<?php echo get_permalink($post->ID); ?>'><?php echo get_the_title($post->ID); ?></a></li>
<?php endif; ?>
<?php echo $children; ?>
</ul>
<?php } else { ?>
<?php } ?>
<h1 class="page-title"><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php wp_link_pages(); ?>
<div class="clearfix"></div>
</div><!-- close .page-content -->
<?php get_template_part( 'pages-sidebar' ); ?>
</div><!-- close .sidebar-container -->
</div><!-- close .content-container -->
<div class="content-container-base">
<div class="side-bar-base side-bar-base-<?php echo of_get_option('sidebar', 'right'); ?>"></div>
</div><!-- close .content-container-base or .content-container-base-pagination -->
<?php
endwhile;
?>
<?php get_footer(); ?>