Initial commit: Wisdom1 barebones theme with landing page, categories, and single post templates
This commit is contained in:
51
index.php
Normal file
51
index.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* The main template file
|
||||
* Used as a fallback for archive and post index views.
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div class="category-header">
|
||||
<div class="site-container">
|
||||
<h1 class="category-title"><?php echo is_home() ? 'The Library' : get_the_archive_title(); ?></h1>
|
||||
<?php if ( get_the_archive_description() ) : ?>
|
||||
<div class="category-description"><?php the_archive_description(); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="site-container">
|
||||
<main id="primary" class="site-main">
|
||||
<div class="insights-grid">
|
||||
<?php
|
||||
if ( have_posts() ) :
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( 'insight-card' ); ?>>
|
||||
<header class="entry-header">
|
||||
<div class="entry-meta">
|
||||
<?php echo get_the_category_list( ', ' ); ?>
|
||||
</div>
|
||||
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
|
||||
</header>
|
||||
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
</div>
|
||||
</article>
|
||||
<?php
|
||||
endwhile;
|
||||
|
||||
the_posts_navigation();
|
||||
else :
|
||||
echo '<p>' . esc_html__( 'No posts found.', 'wisdom1' ) . '</p>';
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
Reference in New Issue
Block a user