Top
Home

Amp Theme - Multisite

These files will be an alternative AMP site when using Multisite in WordPress. Use Plugin called Multisite Post Duplicator



############################## index.php ###############################################################


<?php get_header(); ?>
<button class="toggle" on='tap:sidebar.toggle'>MENU</button>
<figure id="header" class="nintyfive">
<amp-img src="https://mooseifer.com/wp-content/themes/mooseifer/header.png"
width="960"
height="160"
layout="responsive"
alt="">
</amp-img>
</figure>
<div id="loop">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<p><?php the_content( $more_link_text, $strip_teaser, $more_file ); ?></p>
<?php endwhile; else: ?>
<?php _e('Sorry, no posts matched your criteria.'); ?>
<?php endif; ?>
<?php if ( has_post_thumbnail() ) { ?>
<figure class="onehundred" >
<amp-img src="<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 720,405 ), false, '' ); echo $src[0];?> "
width="200"
height="150"
layout="responsive"
alt="">
</amp-img>
</figure>
<?php } ?>
</div>
</body>
</html>


############################## functions.php ###############################################################



<?php
if (function_exists('register_sidebar'))
register_sidebar(array('name' => 'Navigation',));
register_sidebar(array('name' => 'Left',));
register_sidebar(array('name' => 'Right',));
add_theme_support('post-thumbnails');
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10);
function MooseRemove() {
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );
remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );
remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_browser_nag', 'dashboard', 'normal' );
}
add_action('wp_dashboard_setup', 'MooseRemove' );
function my_theme_wrapper_start() {
echo '<section id="main">';
}
function my_theme_wrapper_end() {
echo '</section>';
}
add_action( 'after_setup_theme', 'woocommerce_support' );
function woocommerce_support() {
add_theme_support( 'woocommerce' );
}
if ( function_exists('register_sidebar') )
register_sidebar(array('name' => 'CSS',));
add_theme_support('post-thumbnails');
?>


############################## header.php ###############################################################


<!doctype html>
<html amp lang="en">
<head>
<meta charset="utf-8">
<title>
<?php
global $page, $paged;
wp_title( '|', true, 'right' );
bloginfo( 'name' );
$site_description = get_bloginfo( 'description', 'display' );
echo " | $site_description";
?>
</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Moose Loose LLC">
<link rel="canonical" href="index.html" />
<script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
<!-- <script async custom-element="amp-image-lightbox" src="https://cdn.ampproject.org/v0/amp-image-lightbox-0.1.js"></script>
<script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script>
<script async custom-element="amp-youtube" src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
-->
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<style amp-custom>
*{Font-family:sans-serif;}
amp-sidebar {color:#fff;font-family:sans-serif;line-height:20px;}
amp-sidebar a{color:#fff;text-decoration:none;line-height:16px;}
amp-sidebar a:hover{color:#eee}
amp-sidebar {
background-color:#369;
width: 250px;
padding-right: 10px;
}
.amp-sidebar-image {
line-height: 100px;
vertical-align:middle;
}
.amp-close-image {
top: 15px;
left: 225px;
cursor: pointer;
}
li {
margin-bottom: 20px;
list-style: none;
}
button {
position:absolute;
right:10px;
z-index:999;

}
.toggle {
background-color: #369;
padding-left:6px;
padding-right:6px;
padding-top:3px;
padding-bottom:3px;
color: #fff;
border:1px solid #000;

}
.toggle:hover {
color:#fff
background-color: #006;
border:1px solid #000000;
}
p{margin-bottom:10px;}
img.alignright {
float: right;
margin: 0 0 1em 1em
}
img.alignleft {
float: left;
margin: 0 1em 1em 0
}
img.aligncenter {
display: block;
margin-left: auto;
margin-right: auto
}
a img.alignright {
float: right;
margin: 0 0 1em 1em
}
a img.alignleft {
float: left;
margin: 0 1em 1em 0
}
a img.aligncenter {
display: block;
margin-left: auto;
margin-right: auto
}
a:active {
outline: none;
}
* {
margin: 0;
}
.align-right {
float: right;
margin: 5px
}
.align-left {
float: left;
margin: 5px
}
.twenty {
width: 20%;
height: auto
}
.twentyfive {
width: 25%;
height: auto
}
.thirty {
width: 30%;
height: auto
}
.thirtyfive {
width: 35%;
height: auto
}
.forty {
width: 40%;
height: auto
}
.fortyfive {
width: 45%;
height: auto
}
.fifty {
width: 50%;
height: auto
}
.fiftyfive {
width: 55%;
height: auto
}
.sixty {
width: 60%;
height: auto
}
.sixtyfive {
width: 65%;
height: auto
}
.seventy {
width: 70%;
height: auto
}
.seventyfive {
width: 75%;
height: auto
}
.eighty {
width: 80%;
height: auto
}
.eightyfive {
width: 85%;
height: auto
}
.ninty {
width: 90%;
height: auto
}
.nintyfive {
width: 95%;
height: auto
}
.onehundred {
width: 100%;
height: auto
}
#loop{margin-left:10px;margin-right:10px;}
#header{position:relative;z-index:10;}
</style>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<!-- begin Side Nav -->
<amp-sidebar id='sidebar' layout="nodisplay"
>
<amp-img class='amp-close-image'
src="https://mooseloose.com/images/moose.png"
width="20"
height="20"
alt="close sidebar"
on="tap:sidebar.close"
role="button"
tabindex="0"></amp-img>
<ul>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Navigation") ) : ?>
<?php endif; ?>
</ul>
</amp-sidebar>
<!-- End Side Nav -->

<div id="content">