-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.php
63 lines (48 loc) · 2.06 KB
/
page.php
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
59
60
61
62
63
<?php
/**
* Template part for displaying page content in page.php
* @package southportcapital
*/
use friendlyrobot\Theme as Theme;
use friendlyrobot\core\mvc\Model as Model;
use friendlyrobot\core\mvc\View as View;
get_header();
if ( have_posts() ) {
// Load posts loop.
while ( have_posts() ) {
the_post();
$slug = get_post_field( 'post_name', get_the_ID() );
?>
<div class="<?php echo Theme::textdomain ?>-page container-fluid clearfix px-0 mx-0" id="page-<?php echo $slug ?>">
<div <?php post_class(); ?> >
<div class="row clearfix page-header" style="background-image:url(<?php echo get_the_post_thumbnail_url() ?>);">
<div class="col-12 p-0 header-center">
<h1 class="page-title"><?php echo get_the_title() ?></h1>
<div class="entry-content" id="entry-<?php echo $slug ?>">
<?php
the_content();
?>
</div><!-- .entry-content -->
</div><!-- col12 -->
</div><!--row-->
<div class="row mx-0 px-0 clearfix <?php echo Theme::textdomain ?>-modules">
<div class="col-12 m-0 p-0">
<?php
/* CARBON FIELDS MODEL VIEW CONTROL FOR ALL PAGES */
/* GET THE FIELDS */
$template_sections = \maybe_unserialize( \get_option( $slug . '_template_fields' ) );
/* DATA */
$template_data = new Model( $template_sections, \get_the_ID() );
$template_name = $slug . '.php';
/* TEMPLATE MARKUP */
$markup = new View( $template_data->data_array, $template_name );
echo $markup->render();
?>
</div>
</div>
</div>
</div><!-- #post-<?php the_ID(); ?> -->
<?php
}
}
get_footer();