Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
wordpress page.php
<?php
get_header();
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
$title = the_title( '<h1>', '</h1>', false );
?>
<section class="wrap">
<div class="col col-primary">
<article>
<?php
if ( has_post_thumbnail() ) { ?>
<div class="big-pic">
<?php the_post_thumbnail( 'big-pic' ); ?>
<div class="big-pic-text">
<?php echo $title; ?>
</div>
</div>
<?php } else { ?>
<?php echo $title; ?>
<?php } ?>
<?php the_content();
?>
</article>
</div>
<div class="col col-secondary">
<p>Sidebar</p>
</div>
</section>
<?php
}
}
get_footer();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.