Skip to content

Instantly share code, notes, and snippets.

@aaronreimann
Created May 3, 2019 18:46
Show Gist options
  • Save aaronreimann/923974066590a8f50483299a126a237d to your computer and use it in GitHub Desktop.
Save aaronreimann/923974066590a8f50483299a126a237d to your computer and use it in GitHub Desktop.
<?php
get_header();
?>
<section id="primary" class="content-area">
<main id="main" class="site-main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
?>
</header><!-- .page-header -->
<?php
// Start the Loop.
while ( have_posts() ) :
the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
$post_id = get_the_ID();
$first_name = get_post_meta( $post_id, 'first_name', true );
$last_name = get_post_meta( $post_id, 'last_name', true );
$email = get_post_meta( $post_id, 'email', true );
$phone_number = get_post_meta( $post_id, 'phone_number', true );
echo "<h2>$first_name $last_name $email $phone_number</h2>";
?>
</header><!-- .entry-header -->
<?php twentynineteen_post_thumbnail(); ?>
<div class="entry-content">
</div>
</article>
<?php
// End the loop.
endwhile;
// Previous/next page navigation.
twentynineteen_the_posts_navigation();
// If no content, include the "No posts found" template.
else :
get_template_part( 'template-parts/content/content', 'none' );
endif;
?>
</main><!-- #main -->
</section><!-- #primary -->
<?php
get_footer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment