Skip to content

Instantly share code, notes, and snippets.

@tijmenssmit80
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tijmenssmit80/47e7dbee8f59a31eeecb to your computer and use it in GitHub Desktop.
Save tijmenssmit80/47e7dbee8f59a31eeecb to your computer and use it in GitHub Desktop.
<?php
/**
* Example of a single WPSL store template for the Twenty Fifteen theme.
*
* @package Twenty_Fifteen
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php single_post_title(); ?></h1>
</header>
<div class="entry-content">
<?php
global $post;
$queried_object = get_queried_object();
// Add the map shortcode
echo do_shortcode( '[wpsl_map]' );
// Add the content
$post = get_post( $queried_object->ID );
setup_postdata( $post );
the_content();
wp_reset_postdata( $post );
// Add the address shortcode
echo do_shortcode( '[wpsl_address]' );
?>
</div>
</article>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment