Exemplo n.º 1
0
<?php

get_header();
global $post;
$image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail');
$fecha = get_fecha($post->ID);
$lugar = get_lugar($post->ID);
$is_aerial = get_vista_aerea($post->ID);
$sabias_que = get_sabias_que($post->ID);
$street_view_url = get_street_view_url($post->ID);
$tiny_url = file_get_contents('http://tinyurl.com/api-create.php?url=' . get_permalink());
?>
	<section class="[ main-image ][ container-fluid ][ no-padding margin-bottom ]">
		<div class="[ clearfix ]">
			<div class="[ col-md-3 ][ hidden-xs hidden-sm ]">
				<div class="embed-responsive embed-responsive-4by3">
					<div id="mapa" class="[ map map--mini ][ embed-responsive-item ]"></div>
				</div>
			</div>
			<div class="[ col-xs-12 col-sm-8 col-md-6 ][ col-sm-offset-2 col-md-offset-0 ][ no-padding ]">
				<img class="[ img-responsive ][ margin-auto ]" src="<?php 
echo $image[0];
?>
">
			</div>
		</div>
	</section>

	<a href="<?php 
echo get_previous_photo_url($post->post_name);
?>
Exemplo n.º 2
0
/**
* Here we add all the javascript that needs to be run on the footer.
**/
function footer_scripts()
{
    global $post;
    if (wp_script_is('functions', 'done')) {
        ?>
		<script type="text/javascript">


			<?php 
        if (is_home()) {
            ?>
				/*------------------------------------*\
					#HOME
				\*------------------------------------*/

				//toggleElementOnSscroll( $('header'), '.hero__text');
				toggleElementOnSscroll( $('.image-bg--hero'), '.btn--map--float');

				$(window).scroll(function(){
					//toggleElementOnSscroll( $('header'), '.hero__text');
					toggleElementOnSscroll( $('.image-bg--hero'), '.btn--map--float');
				});

			<?php 
        }
        ?>

			<?php 
        if (is_archive()) {
            ?>
				/*------------------------------------*\
					#MAP
				\*------------------------------------*/

				addAllMarkers();

			<?php 
        }
        ?>


			<?php 
        if (is_single()) {
            ?>
				/*------------------------------------*\
					#SINGLE
				\*------------------------------------*/

				window.fbAsyncInit = function() {
					FB.init({
						appId      : '1487150328256182',
						xfbml      : true,
						version    : 'v2.4'
					});
				};

				(function(d, s, id){
				     var js, fjs = d.getElementsByTagName(s)[0];
				     if (d.getElementById(id)) {return;}
				     js = d.createElement(s); js.id = id;
				     js.src = "//connect.facebook.net/en_US/sdk.js";
				     fjs.parentNode.insertBefore(js, fjs);
				}(document, 'script', 'facebook-jssdk'));


				/**
				 * Triggered events
				**/

				// Pasar a función
				var lat = <?php 
            echo get_lat(get_the_ID());
            ?>
;
				var lng = <?php 
            echo get_lng(get_the_ID());
            ?>
;
				var decada = <?php 
            echo get_decada(get_the_ID());
            ?>
;
				var isAerial = <?php 
            echo get_vista_aerea(get_the_ID());
            ?>
;
				var heading = <?php 
            echo get_heading(get_the_ID());
            ?>
;

				showSingleMap( lat, lng, heading, isAerial, decada );

				$('.js-fb-share').click( function(){
					FB.ui(
					{
						method: 'share',
						name: '<?php 
            echo get_the_title();
            ?>
',
						href: '<?php 
            echo the_permalink();
            ?>
'
					}, function(response){ console.log( response )});
				});

			<?php 
        }
        ?>
		</script>
<?php 
    }
}