function cross_section_shortcode($atts, $content = "")
{
    include "includes/layout.php";
    extract(shortcode_atts(array('img_id' => '', 'img_pos' => 'left', 'link' => false, 'link_txt' => '', 'link_url' => '', 'color' => 'green'), $atts));
    $id = "cross_section_" . rand(0, 1000000);
    $image = $img_id;
    $output = "";
    if ($link && $link_url) {
        $output .= "<a href=\"" . $link_url . "\" target=\"_blank\" id=\"" . $id . "\">";
    }
    $output .= "<div class='cross-section " . $color . "-bg'>";
    if ($img_pos == 'left' && $image) {
        $output .= "<div class='cross-section-img'>";
        $output .= get_retina_images($image, array(570, 470, 370, 768));
        $output .= "</div>";
    }
    $output .= "<div class='cross-section-text'>";
    $output .= "<div class='cross-section-container'>";
    $output .= $content;
    if ($link && $link_txt) {
        $output .= "<p class=\"link-text\">" . $link_txt . "</p>";
    }
    $output .= "</div>";
    $output .= "</div>";
    if ($img_pos == 'right' && $image) {
        $output .= "<div class='cross-section-img'>";
        $output .= get_retina_images($image, array(570, 470, 370, 768));
        $output .= "</div>";
    }
    $output .= "</div>";
    if ($link && $link_url) {
        $output .= "</a>";
    }
    return $output;
}
Ejemplo n.º 2
0
 function retina_images_shortcode($atts)
 {
     $classes = array('retina-shortcode');
     extract(shortcode_atts(array('id' => '', 'caption' => 'false', 'class' => '', 'align' => 'center'), $atts));
     $classes = array_merge($classes, explode(' ', $class));
     $img_sizes = array(460, 376, 345, 768);
     if ($align == 'left' || $align == 'right' || $align == 'center') {
         $classes[] = 'align' . $align;
         if ($align == 'center') {
             $img_sizes = array(950, 783, 720, 768);
         }
     }
     $classes = implode(' ', $classes);
     if ($caption == 'true') {
         $return .= '<div class="wp-caption ' . $classes . '">';
         $return .= get_retina_images($id, $img_sizes);
         $img = get_post($id);
         $return .= '<p class="wp-caption-text">' . $img->post_excerpt . '</p></div>';
     } else {
         $return .= get_retina_images($id, $img_sizes, $classes);
     }
     return $return;
 }
Ejemplo n.º 3
0
if (get_sub_field('link') && get_sub_field('link_text')) {
    ?>
					<p class="link-text"><?php 
    the_sub_field('link_text');
    ?>
</p>
					<?php 
}
?>
				</div>
			</div>
			<?php 
if (get_sub_field('image_position') == 'right') {
    ?>
					<div class='cross-section-img'>
					<?php 
    echo get_retina_images($image['ID'], array(570, 470, 370, 768));
    ?>
					</div>
			<?php 
}
?>
		</div>
	</div>
<?php 
if (get_sub_field('link')) {
    ?>
 
</a> 
<?php 
}
Ejemplo n.º 4
0
'>
				<section class='main post'>
					<?php 
        if ($video_id = get_post_meta('video_id', true)) {
            ?>
						<div class="featured-video">
							<iframe width="960" height="720" src="<?php 
            echo '//www.youtube.com/embed/' . $video_id . '';
            ?>
" frameborder="0" allowfullscreen></iframe>
						</div>
					<?php 
        } elseif (has_post_thumbnail()) {
            ?>
						<?php 
            echo get_retina_images(get_post_thumbnail_id(), array(825, 675, 690, 707));
            ?>
					<?php 
        }
        ?>
					<?php 
        the_content();
        ?>
				</section>

				<?php 
        get_sidebar('single');
        ?>
			</div>

Ejemplo n.º 5
0
    while (have_posts()) {
        the_post();
        ?>
					<a href="<?php 
        echo get_permalink();
        ?>
" class="archive">
						<?php 
        if (has_post_thumbnail()) {
            ?>
							<div class="archive-img">
								<?php 
            $img_id = get_post_thumbnail_id($post->ID);
            ?>
								<?php 
            echo get_retina_images($img_id, array(380, 324, 0, 0));
            ?>
							</div>
						<?php 
        }
        ?>
						<div class="archive-txt">
							<h6 class="archive-txt-meta"><?php 
        echo get_the_date('M j, Y');
        ?>
</h6>
							<h4 class="archive-txt-title"><?php 
        echo get_the_title();
        ?>
</h4>
							<p><?php 
Ejemplo n.º 6
0
		<a href="<?php 
        echo esc_url(get_sub_field('link_to'));
        ?>
">
	<?php 
    }
    ?>
			<div class="generic-block">
			<?php 
    if (get_sub_field('image')) {
        ?>
					<?php 
        $image = get_sub_field('image');
        ?>
					<?php 
        echo get_retina_images($image['ID'], array(324, 258, 184, 681));
        ?>
			<?php 
    }
    ?>
			<?php 
    if (get_sub_field('heading')) {
        ?>
				<h4><?php 
        the_sub_field('heading');
        ?>
</h4>
			<?php 
    }
    ?>
			<?php 
<?php

while (have_rows('banner')) {
    the_row();
    ?>
	<header class="landing-header">
		<?php 
    $img = get_sub_field('image');
    ?>
		<?php 
    echo get_retina_images($img['ID'], array(825, 825, 992, 768));
    ?>
		<div class="container">
			<div class="header-content">
				<h1><?php 
    echo get_sub_field('headline');
    ?>
</h1>
				<p><?php 
    echo get_sub_field('teaser');
    ?>
</p>
				<p><a href="<?php 
    echo get_sub_field('url');
    ?>
"><?php 
    echo append_arrow(get_sub_field('url_text'), 'roman-arrow');
    ?>
</a></p>
			</div>
		</div>