This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
executable file
·70 lines (52 loc) · 2.22 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
64
65
66
67
68
69
<?php
get_header(); ?>
<section id="content" role="region" class="default-content mod left w70">
<?php if (have_posts()) while (have_posts()) : the_post(); ?>
<h1 class="entry-title">
<?php
$blogPage = get_page_by_path('blog');
?>
<a href="<?php get_permalink($blogPage->ID); ?>"
title="Blog"
rel="bookmark">
Blog
</a>
</h1>
<div class="blog single-article">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> role="article">
<div class="post_text">
<h2><?php the_title(); ?></h2>
<?php the_category() ?>
<div class="entry-meta entry-header">
<span class="published">Publié le
<?php the_time(get_option('date_format')); ?>, </span>
<span class="author">par <?php the_author_posts_link(); ?></span>
</div>
<?php the_content(); ?>
<?php wp_link_pages(array('before' => '<div class="page-link">' . __('Pages:', 'themename'), 'after' => '</div>')); ?>
<?php
$branchembed = get_post_meta($post->ID, 'branchembed', true);
// check if the custom field has a value
if ($branchembed != '') {
echo '<div class="branchembed">' . $branchembed . '</div>';
}
?>
</div>
<!-- .entry-content -->
<!-- #entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
<nav class="nav-single">
<?php if (get_adjacent_post(false, '', true)): // if there are older posts ?>
<span class="nav-previous"><?php previous_post_link('%link', __('Article précédent', 'themename')); ?></span>
<?php endif; ?>
<?php if (get_adjacent_post(false, '', false)): // if there are newer posts ?>
<span class="nav-next"><?php next_post_link('%link', __('Article suivant', 'themename')); ?></span>
<?php endif; ?>
</nav><!-- #nav-single -->
</div> <!-- blog -->
<?php endwhile; // end of the loop. ?>
</section>
<div class="sidebar-container" id="blog-sidebar-container">
<?php get_sidebar( $name ); ?>
</div>
<?php get_footer(); ?>