forked from adampatterson/axe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.php
More file actions
executable file
·26 lines (23 loc) · 1.03 KB
/
page.php
File metadata and controls
executable file
·26 lines (23 loc) · 1.03 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
<?php
$data = get_fields();
include(get_template_part_acf('templates/partials/header'));
echo '<!-- master/page -->';
while (have_posts()) : the_post();
if (is_front_page()):
echo '<!-- template: templates/content-home -->';
include(get_template_part_acf('templates/content', 'home'));
else:
if (is_sub_page($post)):
$patent = get_post($post->post_parent);
echo '<!-- template: templates/sub-' . $patent->post_name . ' -->';
include(get_template_part_acf('templates/sub', $patent->post_name));
elseif (check_path('/templates/content-' . $post->post_name . '.php')):
echo '<!-- template: templates/content-' . $post->post_name . ' -->';
include(get_template_part_acf('templates/content', $post->post_name));
else:
echo '<!-- template: templates/content-page -->';
include(get_template_part_acf('templates/content', 'page'));
endif;
endif;
endwhile;
include(get_template_part_acf('templates/partials/footer'));