WordPress Page Template
<?php
/*
Template Name: Main
*/
// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
// error_reporting(E_ALL);
// * plugins
include __DIR__ . "/vendor/autoload.php";
// * form settings
include __DIR__ . "/includes/form-settings.php";
// * header
include __DIR__ . "/components/header/header.php";
// * nav
include __DIR__ . "/components/nav/nav.php";
// * loops through tiers
if (have_rows('tiers')) {
while (have_rows('tiers')) {
the_row();
$section_name = get_row_layout();
include __DIR__ . "/components/$section_name/$section_name.php";
}
}
// * footer
include __DIR__ . "/components/footer/footer-nav.php";
include __DIR__ . "/components/footer/footer.php";
<?php $version = "1.0.0"; ?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="keywords" content="">
<title> <?php the_title(); ?> </title>
<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/assets/favicon.ico" type="image/x-icon">
<!-- Custom CSS -->
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/assets/build/css/main.min.css?ver=<?php echo $version; ?>">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body <?php body_class(); ?>>
<!-- Custom JS -->
<script src="<?php echo get_template_directory_uri(); ?>/assets/build/js/main.js?version=<?php echo $version; ?>"></script>
</body>
</html>
<?php
// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
// error_reporting(E_ALL);
// * plugins
include __DIR__ . "/vendor/autoload.php";
// * form settings
include __DIR__ . "/includes/form-settings.php";
// * header
include __DIR__ . "/components/header/header.php";
// * nav
include __DIR__ . "/components/nav/nav.php";
// * loops through tiers
$id = get_the_id(); // get post id
if (have_rows('tiers', $id)) {
while (have_rows('tiers', $id)) {
the_row();
$section_name = get_row_layout();
include __DIR__ . "/components/tiers/$section_name/$section_name.php";
}
}
// * footer
include __DIR__ . "/components/global/footer/footer-nav.php";
include __DIR__ . "/components/global/footer/footer.php";