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
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
global $post;
if( isset($post) ){
$meta = get_post_meta( $post->ID, 'offshore_options', true );
} else {
$meta = array();
}
if( !isset( $meta['hide_share_buttons'] ) ){
$meta['hide_share_buttons'] = 'global';
}
offshore_entry_before(); ?>
<article <?php post_class(); ?> id="post-<?php esc_attr( the_ID() ); ?>">
<?php offshore_entry_top();
the_content( esc_html__( 'Read more »', 'offshore' ) );
if( 'services' != get_post_type() ) {
if( '0' == get_theme_mod( 'hide_share_buttons', '0' ) && $meta['hide_share_buttons'] == 'global' || $meta['hide_share_buttons'] == 'no' ){
echo '<div class="social-share text-center">
<a class="fb-share" href="http://www.facebook.com/sharer/sharer.php?u=' . urlencode( get_permalink() ) . '&t='. urlencode( get_the_title() ) .'"> <i class="fa fa-facebook" aria-hidden="true"></i>' . esc_html__( 'Share on Facebook', 'offshore' ) . '</a>
<a class="tweet-share" href="https://twitter.com/share?url=' . urlencode( get_permalink() ) . '&text='. urlencode( get_the_title() ) .'"> <i class="fa fa-twitter" aria-hidden="true"></i>' . esc_html__( 'Share on Twitter', 'offshore' ) . '</a>
</div>';
}
}
get_template_part( 'parts/part', 'link-pages' );
offshore_entry_bottom();
if( 'services' != get_post_type() ) {
if( !isset( $meta['hide_post_author_box'] ) ){
$meta['hide_post_author_box'] = 'global';
}
if( '0' == get_theme_mod( 'hide_post_author_box', '0' ) && $meta['hide_post_author_box'] == 'global' || $meta['hide_post_author_box'] == 'no' ){
get_template_part( 'parts/part', 'authormetadata' );
}
}
if( !isset( $meta['template'] ) ) {
$meta['template'] = 'global';
}
if( 'full-width' == get_theme_mod( 'page_template', 'right-sidebar' ) && $meta['template'] == 'global' || $meta['template'] == 'full-width' ) {
echo '<p class="text-center">';
edit_post_link();
echo '</p>';
} else {
edit_post_link();
}
if ( comments_open() ) { ?>
<div id="comments" class="comments">
<?php comments_template(); ?>
</div>
<?php } ?>
</article>
<?php offshore_entry_after();
endwhile; endif; ?>