forked from adampatterson/axe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
executable file
·27 lines (23 loc) · 1.07 KB
/
single.php
File metadata and controls
executable file
·27 lines (23 loc) · 1.07 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
<?php
$data = get_fields();
include(get_template_part_acf('templates/partials/header'));
echo '<!-- master/single -->';
if (have_posts()):
while (have_posts()):
the_post();
if (get_post_type() == 'post' && ! get_post_format()):
echo '<!-- template: templates/format-standard -->';
include(get_template_part_acf('templates/format', 'standard'));
elseif (get_post_type() == 'post'):
echo '<!-- template: templates/format-' . get_post_format() . ' -->';
include(get_template_part_acf('templates/format', get_post_format()));
elseif (check_path('/templates/single-' . get_post_type() . '.php')):
echo '<!-- template: templates/single-' . get_post_type() . ' -->';
include(get_template_part_acf('templates/single', get_post_type()));
else:
echo '<!-- template: templates/content-single -->';
include(get_template_part_acf('templates/content', 'single'));
endif;
endwhile;
endif;
include(get_template_part_acf('templates/partials/footer'));