-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathone-col-template.php
More file actions
33 lines (32 loc) · 1.01 KB
/
one-col-template.php
File metadata and controls
33 lines (32 loc) · 1.01 KB
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
<div class="one-col-content">
<?php if ( is_front_page() ) : ?>
<div class="main-title">
<?php echo bloginfo( 'title' ); ?>
<div class="caption">
<?php echo bloginfo( 'description' ); ?>
</div><!-- .caption -->
</div> <!-- .main-title -->
<?php elseif ( is_page() ) : ?>
<div class="main-title">
<?php wp_title(''); ?>
</div><!-- .main-title -->
<?php endif; ?>
<?php if ( have_posts() ) :
while ( have_posts() ) :
the_post(); ?>
<div class="one-col-post" id="<?php the_title(); ?>">
<h1><?php the_title(); ?></h1>
<?php if ( is_preview() ): ?>
<h3><em>Note: this is a preview.</em></h3>
<?php endif; ?>
<?php get_template_part( 'image-post-template' ); ?>
<?php if ( is_single() ) : ?>
<p class="addon">
<?php bloginfo( 'title' ); ?> |
<?php echo get_the_category()[0]->cat_name; ?> |
<?php the_date( 'F Y' ); ?> </p>
<?php endif; ?>
</div><!-- .one-col-post -->
<?php endwhile;
endif; ?>
</div><!-- .one-col-content -->