Esempio n. 1
0
            get_template_part('hp/hp', 'zitat');
            // Tweet
        } elseif (get_row_layout() == 'social-teaser') {
            get_template_part('hp/hp', 'social');
            // Kopf-Slider
        } elseif (get_row_layout() == 'preistraeger-slider') {
            $kategorie = get_sub_field('kopf-slider');
            $farbe = get_sub_field('color');
            $titel = get_sub_field('slider_titel');
            echo heads_gallery_shortcode(array('kategorie' => $kategorie->slug, 'farbe' => $farbe, 'titel' => $titel));
            wp_reset_query();
        } elseif (get_row_layout() == 'cover-slider') {
            $kategorie = get_sub_field('cover-slider');
            $farbe = get_sub_field('color');
            $titel = get_sub_field('slider_titel');
            echo '<div class="row cover-slider m-t" style="background-color:' . mmbeta_color($farbe) . ' " >';
            echo '<h6 class="heads-gallery-heading">' . $titel . '</h6>';
            echo "<div class='col-md-8 col-md-offset-2'>";
            echo cover_gallery_shortcode(array('kategorie' => $kategorie->slug, 'farbe' => $farbe, 'titel' => $titel));
            echo '</div>';
            echo '</div>';
        }
    }
} else {
    echo "no layouts found";
}
?>


</main><!-- #main -->
Esempio n. 2
0
<?php

/**
 * HP Layout Zitat.
 * Shows $zitat and $zitatgeber
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package medium_magazin_beta
 */
$zitat = get_sub_field('zitat-text');
$zitatgeber = get_sub_field('zitatgeber');
?>

<div class="row m-t m-b" style="background-color: <?php 
echo mmbeta_color(get_sub_field('color'));
?>
">
  <div class="col-xs-12">
    <a href="<?php 
the_sub_field('zitat-link');
?>
">
      <blockquote class="mmbeta_hp_quote">
        <p><?php 
echo $zitat;
?>
</p>
        <footer>
          <cite><?php 
echo '- ' . $zitatgeber;
Esempio n. 3
0
function cover_gallery_shortcode($attr)
{
    if (!isset($attr['kategorie'])) {
        $attr['kategorie'] = 'heftvorschau';
    }
    if (!isset($attr['titel'])) {
        $attr['titel'] = 'Aktuelle Ausgaben';
    }
    if (!isset($attr['farbe'])) {
        $bg_color = 'transparent';
    } else {
        $bg_color = mmbeta_color($attr['farbe']);
    }
    $output = "<div class='cover-gallery'>";
    $query = new WP_Query(array('category_name' => $attr['kategorie']));
    if ($query->have_posts()) {
        while ($query->have_posts()) {
            $query->the_post();
            $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'cover');
            $output .= "<a href='" . get_permalink() . "'><div class='item'>";
            $output .= "<img src='" . $image[0] . "' class='figure-img'>";
            $output .= "</div></a>";
        }
    }
    $output .= "\n    </div>\n    <style>\n    .cover-gallery div.item{\n      padding: 10px 0px;\n      margin: 5px;\n      color: #FFF;\n      -webkit-border-radius: 3px;\n      -moz-border-radius: 3px;\n      border-radius: 3px;\n      text-align: center;\n    }\n\n    </style>\n    <script type='text/javascript'>\n      jQuery(document).ready(function(){\n        if(jQuery('.cover-gallery').length > 0){\n          jQuery('.cover-gallery').owlCarousel({\n            navigation : false,\n            itemsScaleUp:true,\n            itemsCustom : [\n                    [0, 1],\n                    [450, 4],\n                    [600, 6],\n                    [800, 8],\n                    [1000, 10],\n                    [1200, 12],\n                    [1400, 14],\n                    [1600, 16]\n            ]\n          });    \n        }\n      });\n    </script>\n  ";
    return $output;
}