-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontent-gallery.php
46 lines (40 loc) · 1.14 KB
/
content-gallery.php
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
38
39
40
41
42
43
44
45
46
<?php
/**
* content-gallery.php
*
* the default template for showing the gallery post formats.
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- article header -->
<header class="entry-header"><?php
// display single page title if is single
// else display the title in a anchor tag
if ( is_single() ) : ?>
<h1><?php the_title(); ?></h1>
<?php else : ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php endif; ?>
<?php
// display the post meta information
opal_post_meta();
?>
</header>
<!-- article content -->
<div class="entry-content">
<?php
the_content( __( 'Read More →', 'opal' ) );
wp_link_pages();
?>
</div> <!-- .entry-content -->
<!-- article footer -->
<footer class="entry-footer">
<?php
// if we have a single page and the author bio exists
if ( is_single() && get_the_author_meta( 'description' ) ) {
echo '<h2>' . __( 'Written by ', 'opal' ) . get_the_author() . '</h2>';
echo '<p>' . the_author_meta( 'description' ) . '</p>';
}
?>
</footer> <!-- .entry-footer -->
</article>