-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-blog_post.php
55 lines (45 loc) · 1.32 KB
/
single-blog_post.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
<?php
/**
*
* The template for single blog posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package jwd
*/
get_header();
?>
<?php get_template_part('template-parts/part', 'inner-hero'); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<div class="padding-site">
<div class="container-site grid-x grid-margin-x">
<?php while ( have_posts() ) : the_post(); ?>
<!-- Categories -->
<div class="cell large-4">
<?php
$args = array(
'post_type' => 'page',
'fields' => 'ids',
'meta_key' => '_wp_page_template',
'meta_value' => 'template-blog.php'
);
$blog_page = get_pages($args)[0];
$blog_page_id = $blog_page->ID;
$sidebar = get_field("sidebar", $blog_page_id);
$tax = "blog_category";
$title = $sidebar['title'];
$base_link = get_permalink($blog_page_id);
include(locate_template("template-parts/part-category-sidebar.php"));
?>
</div>
<div class="cell large-8">
<?php get_template_part('template-parts/blog/content', 'blog'); ?>
</div>
<?php endwhile; ?>
</div>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();