36 lines
1.0 KiB
PHP
36 lines
1.0 KiB
PHP
<?php
|
|
/**
|
|
* Index — blog fallback.
|
|
*
|
|
* @package XShop
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
get_header();
|
|
?>
|
|
<div class="xshop-container">
|
|
<div class="xshop-layout">
|
|
<div class="xshop-layout__content">
|
|
<header class="xshop-page-header">
|
|
<h1 class="xshop-page-header__title"><?php esc_html_e('Blog', 'xshop'); ?></h1>
|
|
</header>
|
|
|
|
<?php if (have_posts()): ?>
|
|
<div class="xshop-grid xshop-grid--posts">
|
|
<?php while (have_posts()): the_post(); ?>
|
|
<?php get_template_part('template-parts/components/post-card'); ?>
|
|
<?php endwhile; ?>
|
|
</div>
|
|
<?php get_template_part('template-parts/components/pagination'); ?>
|
|
<?php else: ?>
|
|
<?php get_template_part('template-parts/components/empty-state', null, ['title' => esc_html__('No posts yet', 'xshop'), 'text' => esc_html__('When you publish posts they will appear here.', 'xshop')]); ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php get_sidebar(); ?>
|
|
</div>
|
|
</div>
|
|
<?php get_footer(); ?>
|