Пример #1
0
</h1>
							</header>
						<?php 
    }
    ?>

						<?php 
    while (have_posts()) {
        the_post();
        $slug = 'content';
        $name = get_post_type();
        if ('post' === $name) {
            $slug .= '-post';
            $name = get_post_format();
        }
        get_template_part('template-parts/' . $slug, array('name' => $name, 'post' => \WPOO\Post::get(get_the_ID()), 'singular' => false), true);
    }
    ?>
					<?php 
} else {
    ?>
						<?php 
    get_template_part('template-parts/content', 'none');
    ?>
					<?php 
}
?>

				</main>

				<?php 
Пример #2
0
namespace WPStarterTheme;

get_header();
?>

		<div class="container">
			<div class="row">

				<main id="main" class="site-content col-md-<?php 
echo is_active_sidebar('primary') ? 9 : 12;
?>
" role="main">

					<?php 
while (have_posts()) {
    the_post();
    get_template_part('template-parts/content-post', array('name' => get_post_format(), 'post' => \WPOO\Post::get(get_the_ID()), 'singular' => true), true);
}
?>

				</main>

				<?php 
get_sidebar('primary');
?>

			</div>
		</div>

<?php 
get_footer();
Пример #3
0
namespace WPStarterTheme;

get_header();
?>

		<div class="container">
			<div class="row">

				<main id="main" class="site-content col-md-<?php 
echo is_active_sidebar('primary') ? 9 : 12;
?>
" role="main">

					<?php 
while (have_posts()) {
    the_post();
    get_template_part('template-parts/content', array('name' => 'page', 'post' => \WPOO\Post::get(get_the_ID()), 'singular' => true), true);
}
?>

				</main>

				<?php 
get_sidebar('primary');
?>

			</div>
		</div>

<?php 
get_footer();