-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontent-aside.php
83 lines (69 loc) · 3.38 KB
/
content-aside.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/**
* @package Independent Publisher
* @since Independent Publisher 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header>
<h1 class="entry-title p-name">
<a class="u-url" href="<?php the_permalink(); ?>" title="Een notitie" rel="note">Een notitie</a>
</h1>
</header>
<?php /* Only show featured image for Standard post and gallery post formats */ ?>
<?php if ( has_post_thumbnail() && in_array( get_post_format(), array( 'gallery', false ) ) ) : ?>
<a href="<?php the_permalink(); ?>" title="<?php echo indieweb_publisher_post_thumbnail_link_title(); ?>"><?php the_post_thumbnail( 'indieweb_publisher_post_thumbnail' ); ?></a>
<?php endif; ?>
<!-- Show ARTICLES as excerpt and the rest as full content. -->
<?php
if (function_exists ('has_post_kind') && has_post_kind(['Article'])){
the_excerpt(indieweb_publisher_continue_reading_text());
} elseif (function_exists ('has_post_kind') && has_post_kind(['Note'])){
the_content();
} else{
the_excerpt();
};
?>
<?php if ( function_exists( 'wp_pagenavi' ) ) : // WP-PageNavi support ?>
<?php wp_pagenavi( array( 'type' => 'multipart' ) ); ?>
<?php else : ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'independent-publisher' ),
'after' => '</div>',
)
);
?>
<?php endif; ?>
<footer class="entry-meta">
<?php
/*
Show author name and post categories only when post type == post */
?>
<?php if ( 'post' == get_post_type() ) : // post type == post conditional hides category text for Pages on Search ?>
<?php indieweb_publisher_posted_author_cats(); ?>
<?php endif; ?>
<?php
/* Show post date when show post date option enabled */
?>
<?php $separator = apply_filters( 'indieweb_publisher_entry_meta_separator', '|' ); ?>
<?php
if ( indieweb_publisher_option( 'show_date_entry_meta' ) ) {
echo indieweb_publisher_get_post_date();
}
?>
<?php /* Show webmentions link only when post is not password-protected AND pings open AND there are mentions on this post */ ?>
<?php if ( ! post_password_required() && pings_open() && indieweb_publisher_comment_count_mentions() ) : ?>
<?php $mention_count = indieweb_publisher_comment_count_mentions(); ?>
<?php $mention_label = ( indieweb_publisher_comment_count_mentions() > 1 ? __( 'Webmentions', 'independent-publisher' ) : __( 'Webmention', 'independent-publisher' ) ); ?>
<span class="mentions-link"><a href="<?php the_permalink(); ?>#webmentions"><?php echo $mention_count . ' ' . $mention_label; ?></a></span><span class="sep"><?php echo ( comments_open() && ! indieweb_publisher_hide_comments() ) ? ' ' . $separator : ''; ?></span>
<?php endif; ?>
<?php /* Show comments link only when post is not password-protected AND comments are enabled on this post */ ?>
<?php if ( ! post_password_required() && comments_open() && ! indieweb_publisher_hide_comments() ) : ?>
<span class="comments-link"><?php comments_popup_link( __( 'Comment', 'independent-publisher' ), __( '1 Comment', 'independent-publisher' ), __( '% Comments', 'independent-publisher' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'independent-publisher' ), '<span class="sep"> ' . $separator . ' </span> <span class="edit-link">', '</span>' ); ?>
</footer>
<!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->