-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtype.php
63 lines (54 loc) · 1.79 KB
/
type.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/**
* The template used for displaying custom post type content
*
* @package Flint
* @since 1.0.1
*/
global $wp_post_types;
$type = get_post_type();
$_type = $wp_post_types[ $type ];
?>
<div class="row">
<?php echo flint_post_margin( true ); ?>
<article id="post-<?php the_ID(); ?>" <?php flint_post_class(); ?>>
<header class="entry-header">
<?php do_action( 'flint_open_entry_header_' . $type ); ?>
<h1 class="entry-title"><?php
if ( is_singular() ) {
echo the_title();
} else {
echo '<a href="' . get_permalink() . '" rel="bookmark">' . get_the_title() . '</a>';
} ?></h1>
<?php edit_post_link(
sprintf( __( 'Edit %s', 'flint' ), $_type->labels->singular_name ),
'',
'',
0,
'btn btn-default btn-sm btn-edit hidden-xs'
); ?>
<div class="entry-meta">
<?php do_action( 'flint_entry_meta_above_' . $type ); ?>
</div><!-- .entry-meta -->
<?php do_action( 'flint_close_entry_header_' . $type ); ?>
</header><!-- .entry-header -->
<?php if ( is_search() ) : ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php flint_the_content(); ?>
<?php
flint_link_pages( array(
'before' => '<ul class="pagination">',
'after' => '</ul>',
) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-meta clearfix">
<?php do_action( 'flint_entry_meta_below_' . $type ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php echo flint_post_margin(); ?>
</div><!-- .row -->