-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsingle.php
63 lines (60 loc) · 3.44 KB
/
single.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 get_header(); ?>
<div class="container">
<div class="row">
<div class="col-lg-9 intContent pr-2">
<br />
<article itemscope itemtype="http://schema.org/Article">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="<?php echo get_permalink(); ?>"/>
<h1 itemprop="headline"><?php the_title(); ?></h1>
<div id="featImg" itemprop="image" itemscope="" itemtype="https://schema.org/ImageObject">
<?php the_post_thumbnail(); ?>
<meta itemprop="url" content="<?php $thumb_id = get_post_thumbnail_id(); $thumb_url = wp_get_attachment_image_src($thumb_id,'full', true); echo $thumb_url[0];?>">
<meta itemprop="width" content="<?php $imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ); echo $imgwidth = $imgdata[1];?>">
<meta itemprop="height" content="<?php $imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ); echo $imgwidth = $imgdata[2];?>">
</div>
<meta itemprop="dateModified" content="<?php the_modified_date(); ?>">
<br />
<div class="card text-center bg-secondary text-white mt-2 mb-3">
<div class="card-header">
<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<?php echo get_avatar( get_the_author_meta('ID'), 75 ); ?>
<span itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<img itemprop="url" src="<?php echo get_template_directory_uri(); ?>/media/apple-icon-72x72.png" alt="benkaminski.com logo" />
</span>
<meta itemprop="name" content="BenKaminski.com">
</div>
</div>
<div class="card-body">
<h4 class="card-title"><meta itemprop="datePublished" content="<?php the_time('Y-m-d') ?>"/><?php the_time('F jS, Y') ?></h4>
<p itemprop="author" itemscope itemtype="https://schema.org/Person" class="card-text"> by <span itemprop="name"><?php the_author() ?></span></p>
<p class="text-center">
<a class="badge badge-info badge-pill p-2" href="<?php comments_link(); ?>"><i class="fas fa-comments fa-fw"></i> <?php comments_number( '0 comments', '1 comment', '% comments' ); ?></a>
</p>
</div>
<div class="card-footer">
<p class="text-center mb-2">Sharing is appreciated!</p>
<?php echo do_shortcode('[addthis tool="addthis_inline_share_toolbox"]'); ?>
</div>
</div>
<div itemprop="articleBody">
<?php the_content(); ?>
<div class="alert alert-success">
<p class="text-center mb-2">If you found this article helpful, please share and follow on social media.</p>
<?php echo do_shortcode('[addthis tool="addthis_inline_share_toolbox"]'); ?>
</div>
</div>
<br />
<?php comments_template(); ?>
<p><small><em><?php the_tags('<span class="badge badge-success">Related:</span> <span itemprop="keywords">'); ?></span></em></small><br /></p>
<?php endwhile; else: ?>
<p><?php _e('Whoops, something went horribly wrong. Please seek help immediately.'); ?></p>
<?php endif; ?>
</article>
</div>
<div class="col-lg-3 sidebarShell">
<?php get_sidebar(); ?>
</div>
</div>
</div>
<?php get_footer(); ?>