mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-17 07:35:44 +03:00
Theme: Create template part for single pledge
This commit is contained in:
parent
59713ca0f1
commit
3d9207d9cd
2 changed files with 63 additions and 2 deletions
|
@ -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 -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue