-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcustom-template-content.php
More file actions
executable file
·58 lines (53 loc) · 985 Bytes
/
custom-template-content.php
File metadata and controls
executable file
·58 lines (53 loc) · 985 Bytes
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
<?php
/**
* Template Name: Content Only
*
* Hides all grid-parts and only renders the content and the mobile-nav.
*
* @package Gridd
*/
use Gridd\Theme;
/**
* Modify the grid.
*/
add_filter(
'gridd_get_options',
/**
* Filters the value of the grid.
*
* @since 1.0.3
* @param mixed $value The theme-mod value.
* @param string $theme_mod The theme-mod.
* @return mixed
*/
function( $value, $theme_mod ) {
if ( 'gridd_grid' === $theme_mod ) {
return [
'rows' => 1,
'columns' => 1,
'areas' => [
'content' => [
'cells' => [ [ 1, 1 ] ],
],
],
'gridTemplate' => [
'rows' => [ 'auto' ],
'columns' => [ 'auto' ],
],
];
}
return $value;
},
10,
2
);
get_header();
while ( have_posts() ) {
the_post();
Theme::get_template_part( 'template-parts/content', 'page' );
if ( comments_open() || get_comments_number() ) {
comments_template();
}
}
get_sidebar();
get_footer();