Skip to content

Instantly share code, notes, and snippets.

@bhubbard
Last active August 29, 2015 14:16
Show Gist options
  • Save bhubbard/6072d7f1fb4af7ab2e6e to your computer and use it in GitHub Desktop.
Save bhubbard/6072d7f1fb4af7ab2e6e to your computer and use it in GitHub Desktop.
<?php if( function_exists( 'wpseo_local_show_address' ) ) { wpseo_local_show_address( array( 'echo' => 'true' ) ); } ?>
<?php
// // Can be used in any (template) file, will do the same as shortcode [wpseo_address]
if( function_exists( 'wpseo_local_show_address' ) ) {
$params = array(
'echo' => true,
'id' => 237,
'show_state' => true,
'show_country' => true,
'show_phone' => true,
'oneline' => false,
);
wpseo_local_show_address( $params );
} ?>
<?php if( function_exists( 'wpseo_local_show_map' ) ) { wpseo_local_show_map(); } ?>
<?php
// Can be used in any (template) file, will do the same as [wpseo_map] in posts/pages.
if( function_exists( 'wpseo_local_show_map' ) ) {
$params = array(
'echo' => true,
'id' => 347,
'width' => 800,
'height' => 600,
'zoom' => 5,
'show_route' => true
);
wpseo_local_show_map( $params );
}<br>
<?php if( function_exists( 'wpseo_local_show_opening_hours' ) ) { wpseo_local_show_opening_hours( array( 'echo' => true ) ); } ?>
<?php
// Can be used in any (template) file, will do the same as [wpseo_opening_hours]
if ( function_exists( 'wpseo_local_show_opening_hours' ) ) {
$params = array(
'id' => 237,
'hide_closed' => false,
'echo' => true,
'comment' => ''
);
wpseo_local_show_opening_hours( $params );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment