-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-single.php
70 lines (61 loc) · 1.91 KB
/
content-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
70
<?php
/**
* @package _mbbasetheme
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="top-banner page-banner"></div>
<div class="post-title">
<h2><?php _e( 'Helpful Articles', '_mbbasetheme' ); ?></h2>
</div>
<div class="breadcrumbs">
<div class="container">
<a class="home" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php _e( 'Home', '_mbbasetheme' ); ?></a><a class="blog" href="<?php echo get_page_link(11); ?>"><?php _e( 'Blog', '_mbbasetheme' ); ?></a><a class="current" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</div>
</div>
<div class="post-page-content">
<div class="container">
<div class="post-image">
<?php the_post_thumbnail(); ?>
</div>
<div class="post-category">
<?php the_category(); ?>
</div>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
</div>
</div><!-- .entry-content -->
<div class="related-articles">
<div class="container">
<h3>Related posts</h3>
<div class="articles-container">
<?php
global $post;
$categories = get_the_category();
$category = $categories[0];
$cat_ID = $category->cat_ID;
$myposts = get_posts("numberposts=6&category=$cat_ID");
?>
<?php foreach($myposts as $post) :?>
<article>
<div class="post-container">
<div class="post-image">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail(array(360, 200)); ?>
</a>
</div>
<div class="post-category">
<?php the_category(); ?>
</div>
<div class="post-content">
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php my_excerpt(12); ?>
<a class="read-more" href="<?php the_permalink(); ?>">read more</a>
</div>
</div>
</article>
<?php endforeach; ?>
</div>
</div>
</div>
</article><!-- #post-## -->