-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
22 lines (20 loc) · 834 Bytes
/
single.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php get_header(); ?>
<main>
<section class="project">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post();
$post_cover_text = get_post_meta( $post->ID, 'cover_meta', 1);
if ( empty($post_cover_text) ) {
$post_cover_text = get_the_excerpt();
};
$post_color = get_post_meta( $post->ID, 'color_meta', 1);
$post_style = 'style="background-color:' . $post_color . '"';
?>
<header <?php print $post_style; ?>>
<span class="wrapper">With <h1><?php the_title(); ?></h1></span>
<h2><?php print $post_cover_text; ?></h2>
</header>
<?php the_content(); ?>
<?php endwhile; endif; ?>
</section>
</main>
<?php get_footer(); ?>