This repository was archived by the owner on Dec 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsingle.php
More file actions
84 lines (59 loc) · 2.57 KB
/
single.php
File metadata and controls
84 lines (59 loc) · 2.57 KB
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
84
<?php get_header(); ?>
<main role="main" id="main_content">
<!-- section -->
<section>
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<!-- article -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<section class="section margin--bottom-huge padding--small padding--top-large">
<div class="section__content">
<?php
$categories = get_the_category();
if ( ! empty( $categories ) ) {
echo '<p itemscope itemtype="http://schema.org/Article" itemref="_articleSection2 _articleSection3 _articleSection4 _articleBody5" class="padding--horizontal-none@desktop margin--bottom-small text--grey-dark">';
echo '<a class="margin--bottom-small text--grey-dark" href="/">Homepage</a> / ';
echo '<a class="margin--bottom-small text--grey-dark" href="' . esc_url( get_category_link( $categories[0]->term_id ) ) . '">' . esc_html( $categories[0]->name ) . '</a>';
echo ' / </p>';
}
?>
<span itemscope itemtype="http://schema.org/Article" itemref="_articleSection2 _articleSection3 _articleSection4">
<?php if( get_field('show_title') == 'yes' ): ?>
<h1 itemprop="name" class="padding--horizontal-none@desktop"><?php the_title(); ?></h1>
<?php endif; ?>
<div class="flex flex--justify-between flex--direction-column flex--direction-row@tablet flex--align-center@tablet">
<?php get_template_part('partials/author', 'strap'); ?>
<?php get_template_part('partials/social', 'share'); ?>
</div>
<!-- post thumbnail -->
<?php if ( has_post_thumbnail()) : // Check if Thumbnail exists ?>
<div title="<?php the_title(); ?>" class="margin--bottom-default">
<?php the_post_thumbnail('wrapper'); // Fullsize image for the single post ?>
</div>
<?php endif; ?>
<!-- /post thumbnail -->
<?php the_content(); // Dynamic Content ?>
</span>
</div>
</section>
<?php $post_link_text = 'Edit Post'; ?>
<?php edit_post_link( __( $post_link_text, 'textdomain' ), '', '', null, 'link link--float' ); ?>
<!-- REMOVE COMMENTS TO ENABLE RELATED ITEMS
<section class="section section--wide padding--small margin--bottom-default">
<div class="section__content">
<?php get_template_part('partials/related', 'random'); ?>
</div>
</section>
-->
</article>
<?php endwhile; ?>
<?php else: ?>
<!-- article -->
<article>
<h1><?php _e( 'Sorry, nothing to display.', 'html5blank' ); ?></h1>
</article>
<!-- /article -->
<?php endif; ?>
</section>
<!-- /section -->
</main>
<?php get_footer(); ?>