Add theme wrapper, re-organize template files
- Implement scribu’s Theme Wrapper (see base.php) - Move templates, comments.php, and searchform.php to templates/ folder - Rename loop- files to content- - Remove all hooks except roots_head and roots_footer - Use templates/page-header.php for page titles - Use head.php for everything in <head>
This commit is contained in:
31
base.php
Normal file
31
base.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php get_template_part('templates/head'); ?>
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<!--[if lt IE 7]><div class="alert">Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</div><![endif]-->
|
||||
|
||||
<?php
|
||||
// Use Bootstrap's navbar if enabled in config.php
|
||||
if (current_theme_supports('bootstrap-top-navbar')) {
|
||||
get_template_part('templates/header-top-navbar');
|
||||
} else {
|
||||
get_template_part('templates/header');
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="wrap" class="container" role="document">
|
||||
<div id="content" class="row">
|
||||
<div id="main" class="<?php roots_main_class(); ?>" role="main">
|
||||
<?php include roots_template_path(); ?>
|
||||
</div>
|
||||
<?php if (roots_sidebar()) { ?>
|
||||
<aside id="sidebar" class="<?php roots_sidebar_class(); ?>" role="complementary">
|
||||
<?php get_template_part('templates/sidebar'); ?>
|
||||
</aside>
|
||||
<?php } ?>
|
||||
</div><!-- /#content -->
|
||||
</div><!-- /#wrap -->
|
||||
|
||||
<?php get_template_part('templates/footer'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user