Skip to content

Commit 4c695ff

Browse files
authored
Merge pull request #380 from creativedotdesign/page-blank
feat: Black Page template for standalone apps
2 parents 186e1ab + 3e4c348 commit 4c695ff

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

page-blank.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
/**
4+
* Template: Blank page
5+
*
6+
*
7+
* @package Tofino
8+
* @since 5.0.0
9+
*/
10+
11+
use \Tofino\Helpers as h; ?>
12+
13+
<!doctype html>
14+
<html <?php language_attributes(); ?>>
15+
16+
<head>
17+
<meta charset="utf-8">
18+
<meta name="viewport" content="width=device-width, initial-scale=1">
19+
<?php wp_head(); ?>
20+
</head>
21+
22+
<body <?php body_class(); ?>><?php
23+
24+
$template = h\get_page_name();
25+
26+
if (locate_template('templates/content-page-' . $template . '.php') != '') {
27+
get_template_part('templates/content-page', $template); // e.g. templates/content-page-members.php
28+
} else {
29+
if (function_exists('icl_object_id')) { //WPML installed
30+
$original_page_id = apply_filters('wpml_object_id', get_the_ID(), 'page', false, 'en'); //Assumes english is the primary language.
31+
if ($original_page_id) {
32+
$template = h\get_page_name($original_page_id);
33+
}
34+
}
35+
get_template_part('templates/content-page', $template);
36+
} ?>
37+
38+
<?php wp_footer(); ?>
39+
40+
<?php do_action('tofino_after_footer'); ?>
41+
42+
</body>
43+
</html>

0 commit comments

Comments
 (0)