Skip to content

Instantly share code, notes, and snippets.

@BenSibley
Created July 9, 2024 16:23
Show Gist options
  • Save BenSibley/76ae2b415f3f8c431cd46bb9de823084 to your computer and use it in GitHub Desktop.
Save BenSibley/76ae2b415f3f8c431cd46bb9de823084 to your computer and use it in GitHub Desktop.
Example page template
<?php
/*
** Template Name: Homepage
*/
get_header(); ?>
<div id="loop-container" class="loop-container">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post(); ?>
<div <?php post_class(); ?>>
<?php do_action( 'ct_mission_news_page_before' ); ?>
<article>
<?php ct_mission_news_featured_image(); ?>
<div class='post-header'>
<h1 class='post-title'><?php the_title(); ?></h1>
</div>
<div class="post-content">
<?php the_content(); ?>
<?php do_action( 'ct_mission_news_page_after' ); ?>
<?php get_sidebar( 'after-page' ); ?>
</div>
</article>
<?php comments_template(); ?>
</div><?php
endwhile;
endif;
?>
</div>
<?php get_footer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment