-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpage.php
More file actions
63 lines (53 loc) · 1.85 KB
/
Copy pathpage.php
File metadata and controls
63 lines (53 loc) · 1.85 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
<?php get_header(); ?>
<div id="content" class="hfeed row">
<?php
$show_about_sidebar = cboxol_is_brand_page( 'about' ) || cboxol_is_brand_page( 'terms-of-use' ) || cboxol_is_brand_page( 'contact-us' );
// Show About sidebar on descendants of all brand pages except for Help.
if ( ! $show_about_sidebar ) {
$brand_page_ancestor_id = openlab_get_brand_page_ancestor();
if ( $brand_page_ancestor_id ) {
$help_brand_page = cboxol_get_brand_page( 'help' );
$show_about_sidebar = $help_brand_page && $help_brand_page['id'] !== $brand_page_ancestor_id;
}
}
if ( $show_about_sidebar ) {
get_template_part( 'parts/sidebar/about-mobile' );
}
?>
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
?>
<div <?php post_class( 'col-sm-18 col-xs-24' ); ?> role="main">
<div id="openlab-main-content" class="content-wrapper">
<div class="entry-title">
<h1><span class="profile-name"><?php the_title(); ?></span></h1>
<?php if ( $show_about_sidebar ) : ?>
<div class="directory-title-meta">
<button data-target="#sidebar-mobile" class="mobile-toggle direct-toggle pull-right visible-xs" type="button">
<span class="sr-only"><?php esc_html_e( 'Toggle navigation', 'commons-in-a-box' ); ?></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<?php endif; ?>
</div>
<div class="entry-content"><?php the_content(); ?></div>
</div>
</div><!--hentry-->
<?php
endwhile;
endif;
?>
<?php
//add the about-page sidebar to just the about page and any child about page
if ( $show_about_sidebar ) {
get_template_part( 'parts/sidebar/about' );
} elseif ( is_page( 'help' ) ) {
get_template_part( 'parts/sidebar/help' );
}
?>
</div><!--#content-->
<?php get_footer(); ?>