Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The template for displaying all pages.
- *
- * This is the template that displays all pages by default.
- * Please note that this is the WordPress construct of pages
- * and that other 'pages' on your WordPress site may use a
- * different template.
- *
- * @link https://codex.wordpress.org/Template_Hierarchy
- *
- * @package sws
- */
- get_header(); ?>
- <div id="primary" class="content-area ">
- <main id="main" class="site-main" role="main">
- <!-- Show Title -->
- <?php while ( have_posts() ) : the_post(); ?>
- <header class="entry-header">
- <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
- </header><!-- .entry-header -->
- <?php endwhile; ?>
- <!-- End Show Title -->
- <!-- Featured Units -->
- <?php
- $args = array(
- 'post_type' => 'product',
- 'meta_key' => '_featured',
- 'meta_value' => 'yes',
- 'posts_per_page' => 4
- );
- $featured_query = new WP_Query( $args ); ?>
- <div class="section box-featured-units group">
- <h1 class="section-title"><?php _e( 'Featured Units' , THEMELANG ) ?></h1>
- <?php if ($featured_query->have_posts()) : ?>
- <div class="featured-products col">
- <?php while ($featured_query->have_posts()) : $featured_query->the_post();
- $product = wc_get_product( $featured_query->post->ID );
- ?>
- <div class="product">
- <div class="wrap">
- <h1 class="product-title"><?php the_title(); ?></h1><hr>
- <h2 class="product-price"><span>From <?php echo get_woocommerce_currency_symbol(); ?></span><?php echo $product->get_price(); ?></h2>
- <?php echo do_shortcode('[button url="./reserve-now" class="btn-primary btn-sm" target="self"]Reserve Now[/button]'); ?>
- </div>
- </div>
- <?php endwhile; ?>
- </div>
- <?php endif; wp_reset_query(); ?>
- <div class="sws-links col climate-control">
- <a href="#"><?php _e( 'Climate Control Units' , THEMELANG ); ?></a>
- <?php echo do_shortcode('[button url="./basic-storage" class="btn-primary btn-sm"]LEARN MORE![/button]'); ?>
- </div>
- <!-- Syrasoft Links -->
- <div class="sws-links col syrasoft">
- <ul class="sim-links-list">
- <li>
- <a href="./all-units">
- <?php _e( 'All Units',THEMELANG ); ?>
- </a>
- </li>
- <li>
- <a href="./space-calculator">
- <?php _e( 'Storage Calculators',THEMELANG ); ?>
- </a>
- </li>
- </ul>
- </div>
- </div>
- <!-- Entry Content -->
- <div class="col span_2_of_2 section-entry-content">
- <?php while ( have_posts() ) : the_post(); ?>
- <div class="entry-content">
- <?php the_content(); ?>
- </div><!-- .entry-content -->
- <?php endwhile; ?>
- </div>
- <!-- Contact Us Details /Map -->
- <div class="col span_2_of_2 section-contact-us group">
- <?php
- /**
- * Get Metaboxes input details
- */
- $contact_page_id = 18;
- $telno = rwmb_meta( '{$prefix}telno' , 'type=text', $contact_page_id );
- $email = rwmb_meta( '{$prefix}email' , 'type=email', $contact_page_id );
- $address = rwmb_meta( '{$prefix}address' , 'type=text', $contact_page_id );
- $notes = rwmb_meta( '{$prefix}other_notes' , 'type=textarea', $contact_page_id );
- $hours = get_post_meta( $contact_page_id, '{$prefix}office_hours' , true );
- $args = array(
- 'type' => 'map',
- 'width' => '100%',
- 'height' => '500px',
- 'zoom' => 10,
- 'marker' => true, // Display marker? Default is 'true',
- 'marker_title' => '', // Marker title when hover
- 'info_window' => '<div class="info-window"><h1>' . get_bloginfo('title') . '</h1><p class="address">' . $address . '</p> <p class="link-direction"><a href="https://www.google.com/maps/place/240+NH-108,+Somersworth,+NH+03878/@43.2479827,-70.9007997,18z/data=!4m20!1m14!4m13!1m4!2m2!1d14.4222689!2d50.0860381!4e1!1m6!1m2!1s0x89e2998cae6e15d9:0x38ed09c2da078f7f!2s240+Route+108,+Somersworth,+NH!2m2!1d-70.9008387!2d43.2486556!3e0!3m4!1s0x89e2998cae6e15d9:0x38ed09c2da078f7f!8m2!3d43.2486556!4d-70.9008387" target="_blank">Directions</a></p></div>', // Info window content, can be anything. HTML allowed.
- );
- $map = rwmb_meta( '_sws_map', $args, $contact_page_id );
- ?>
- <div class="section group">
- <div class="col span_1_of_2 text">
- <ul class="contact-list">
- <li>
- <div class="wrap">
- <h1 class="section-title"><?php _e( 'Contact Us' , THEMELANG ); ?></h1>
- <p class="address"><span><?php _e( 'Address:' , THEMELANG ); ?></span><br><?php echo $address; ?></p>
- <?php echo do_shortcode('[button id="email-us-now" url="./contact" class="btn-white"]Email us now[/button]'); ?>
- <p class="telephone"><span><?php _e( 'Telephone:' , THEMELANG ); ?></span><br><?php echo $telno; ?></p>
- </div>
- </li>
- <li>
- <div class="wrap">
- <h1 class="section-title"><?php _e( 'Hours' , THEMELANG ); ?></h1>
- <div class="wrap-date-time">
- <?php foreach ($hours as $hour) : ?>
- <div class="date-time">
- <span class="section-label"><?php echo $hour['{$prefix}day']; ?></span>
- <span><?php echo $hour['{$prefix}time']; ?></span>
- </div>
- <?php endforeach; ?>
- </div>
- <p class="other-notes"><?php echo $notes; ?></p>
- </div>
- </li>
- </ul>
- </div>
- <div class="col span_1_of_2 wrapper-map">
- <?php echo $map; ?>
- </div>
- </div>
- </div>
- <!-- End Contact Us Details /Map -->
- <!-- Blog / Reviews -->
- <div class="section section-blog-review group">
- <div class="col span_1_of_2 wrap-blog">
- <?php echo do_shortcode('[show_recent_blog]'); ?>
- </div>
- <div class="col span_1_of_2 wrap-review">
- <?php echo do_shortcode('[display-frm-data id=recent-reviews filter=1]'); ?>
- </div>
- </div>
- </div>
- </main><!-- #main -->
- </div><!-- #primary -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement