Put blog post elements in different order
-
Hi there,
I’m customising the Twenty Thirteen theme using a child theme.
I want to move the individual post elements around on the main blog page. I want to have the post title first, then the entry meta then the post content and lastly the featured image.
I’ve tried moving bits of php code around and gotten in a real muddle and the page has lost styling.
I know css/html but very little php/js. Any help much appreciated ??
Thanks CB
———-
This is how the code looks after I moved it around.
<article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<header class=”entry-header”><?php if ( is_single() ) : ?>
<h1 class=”entry-title”><?php the_title(); ?></h1>
<?php else : ?>
<h1 class=”entry-title”>
” rel=”bookmark”><?php the_title(); ?>
</h1></header>
<?php endif; // is_single() ?>
<?php if ( has_post_thumbnail() && ! post_password_required() && ! is_attachment() ) : ?>
<div class=”entry-thumbnail”>
<?php the_post_thumbnail(); ?>
</div>
<?php endif; ?><!– .entry-header –>
<div class=”entry-meta”>
<span style=”font-family: ‘suisse_intllight’, ‘Arial’, sans-serif; color:#ccc;”>POSTED BY:</span> <?php the_author(); ?>,
<?php twentythirteen_entry_meta(); ?>
<?php edit_post_link( __( ‘Edit’, ‘twentythirteen’ ), ‘<span class=”edit-link”>’, ‘</span>’ ); ?>
</div><!– .entry-meta –>
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class=”entry-summary”>
<?php the_excerpt(); ?>
</div><!– .entry-summary –>
<?php else : ?>
<div class=”entry-content”>
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( ‘Continue reading %s <span class=”meta-nav”>→</span>’, ‘twentythirteen’ ),
the_title( ‘<span class=”screen-reader-text”>’, ‘</span>’, false )
) );
- The topic ‘Put blog post elements in different order’ is closed to new replies.