forked from zoephilipps/scratch-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent-layouts.php
More file actions
47 lines (34 loc) · 917 Bytes
/
content-layouts.php
File metadata and controls
47 lines (34 loc) · 917 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
<?php
if( have_rows('layout') ) {
$GLOBALS['layout_count'] = 1; while ( have_rows('layout') ) { the_row();
if( get_row_layout() === 'hero_unit' ) { ?>
<?php get_template_part( 'layouts/layout', 'hero_unit' ); ?>
<?php
} elseif( get_row_layout() === 'flexible_columns' ) {
?>
<?php get_template_part( 'layouts/layout', 'flexible_columns' ); ?>
<?php
} elseif( get_row_layout() === 'staggered_images_with_text' ) {
?>
<?php get_template_part( 'layouts/layout', 'staggered_images_with_text' ); ?>
<?php
} elseif( get_row_layout() === 'slider' ) {
?>
<?php get_template_part( 'layouts/layout', 'slider' ); ?>
<?php
} elseif( get_row_layout() === 'wysiwygs' ) {
?>
<?php get_template_part( 'layouts/layout', 'wysiwygs' ); ?>
<?php
}
?>
<?php
$GLOBALS['layout_count']++;
}
?>
<?php
} else {
?>
<?php
}
?>