forked from jaredh159/support
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblurb.php
More file actions
37 lines (28 loc) · 870 Bytes
/
blurb.php
File metadata and controls
37 lines (28 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Template Name: Blurb
* The template for displaying custom post type 'blurb'
*
* @package WordPress
* @subpackage Twenty_Fifteen
* @since Twenty Fifteen 1.0
*/
// Start a new loop
while ( have_posts() ) : the_post();
$key="blurb_type";
echo "<!-- post id: " . $post->ID . " blurb_type: " . get_post_meta( $post->ID, $key, true ) . " -->";
// Info blurb
if ( is_single() && get_post_meta( $post->ID, $key, true ) == 'info' ) :
echo '<p class="blurb-content info">';
endif;
// Notice blurb
if ( is_single() && get_post_meta( $post->ID, $key, true ) == 'notice' ) :
echo '<p class="blurb-content notice">';
endif;
// Warning blurb
if ( is_single() && get_post_meta( $post->ID, $key, true ) == 'warning' ) :
echo '<p class="blurb-content warning">';
endif;
echo get_the_content() . "</p><!-- .blurb-content -->";
endwhile;
?>