forked from gmvi/vera-wordpress-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.php
62 lines (50 loc) · 2.35 KB
/
page.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
<?php
/**
*
* Template for generic content pages
*/
get_header();
$container = get_theme_mod( 'understrap_container_type' );
?>
<div class="wrapper" id="full-width-page-wrapper">
<div class="<?php echo esc_attr( $container ); ?> p-0">
<main class="site-main" id="main" role="main">
<!--
TODO: use wp_get_nav_menu_object() to check if menu for $pagename exists, if it does use centered-submenu template
https://stackoverflow.com/questions/4837006/how-to-get-the-current-page-name-in-wordpress
-->
<?php the_post(); // This is a page template ?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php
if (has_post_thumbnail( get_the_ID() )) {
get_template_part('partial-templates/titlecard-fullwidth');
} else {
get_template_part( 'partial-templates/block-header');
}
global $post;
$wrapper_class_name = 'entry-header';
// if there is a menu that is identical to the post name, then use that
// to display the subnav. otherwise, check for parent post
if (wp_get_nav_menu_object($post->post_name)!== false) {
$menu_name = $post->post_name;
} else {
$menu_name = get_post_field( 'post_name', $post->post_parent );
}
include( locate_template( 'partial-templates/centered-submenu.php') );
?>
<div id="content" class="entry-content">
<div class="row pt-4 pb-4 ml-1 no-gutters">
<div class="col-sm-1"></div>
<div class="col-sm-9 pb-3 blog-contents">
<?php the_content()?>
<hr class="pb-2"/>
<p class="share-call mb-1">Share this story</p>
<?php get_template_part('partial-templates/share-post-icons') ?>
</div>
</div>
</div>
</article><!-- #post-## -->
</main><!-- #main -->
</div><!-- Container end -->
</div><!-- Wrapper end -->
<?php get_footer(); ?>