Theme: Create template part for single pledge

This commit is contained in:
Corey McKrill 2019-10-22 13:47:12 -07:00
parent 59713ca0f1
commit 3d9207d9cd
No known key found for this signature in database
GPG key ID: C2C0746F7BF17E38
2 changed files with 63 additions and 2 deletions

View file

@ -1,7 +1,8 @@
<?php
namespace WordPressDotOrg\FiveForTheFuture\Theme;
$post_type = get_post_type(); // 5ftf_pledge
get_header(); ?>
<main id="main" class="site-main" role="main">
@ -9,7 +10,7 @@ get_header(); ?>
<?php while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/plugin', 'single' );
get_template_part( 'template-parts/' . $post_type, 'single' );
endwhile; ?>
</main><!-- #main -->