Exemplo n.º 1
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();
Exemplo n.º 2
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 
 public function get_meta($field = '', $single = null, $formatted = false)
 {
     return parent::get_meta($field, $single, $formatted);
 }
Exemplo n.º 4
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();