Created
November 10, 2016 16:24
-
-
Save Netzberufler/c00dabee598c7a77a88fa0a7496e905e to your computer and use it in GitHub Desktop.
Grid Layout mit Flexbox: WordPress Loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying archive pages | |
*/ | |
get_header(); ?> | |
<div id="primary" class="content-area"> | |
<main id="main" class="site-main" role="main"> | |
<?php if ( have_posts() ) : ?> | |
<header class="page-header"> | |
<?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?> | |
</header><!-- .page-header --> | |
<div class="post-wrapper"> | |
<?php | |
while ( have_posts() ) : the_post(); | |
get_template_part( 'template-parts/content' ); | |
endwhile; | |
?> | |
</div> | |
<?php endif; ?> | |
</main><!-- .site-main --> | |
</div><!-- .content-area --> | |
<?php get_sidebar(); ?> | |
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template part for displaying content | |
*/ | |
?> | |
<div class="post-column"> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<header class="entry-header"> | |
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?> | |
</header><!-- .entry-header --> | |
<?php the_post_thumbnail(); ?> | |
<div class="entry-content"> | |
<?php the_content( esc_html__( 'Read more', 'theme-slug' ) ); ?> | |
</div><!-- .entry-content --> | |
</article><!-- #post-## --> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment