Skip to content

Commit

Permalink
Day of Event Template: Use the theme's template if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Nov 11, 2019
1 parent b52f023 commit f9b75ce
Showing 1 changed file with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,22 @@
<main id="main" class="site-main">
<?php while ( have_posts() ) :
the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header>

<div class="entry-content">
<?php the_content(); ?>
</div>
</article>

if ( locate_template( [ 'template-parts/content.php' ] ) ) :

get_template_part( 'template-parts/content' );

else : ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header>

<div class="entry-content">
<?php the_content(); ?>
</div>
</article>
<?php endif; ?>
<?php endwhile; ?>
</main>

Expand Down

0 comments on commit f9b75ce

Please sign in to comment.