function slider($queried_posts) { global $post; ?> <section class="l-clear js-flickity m-flickity" data-flickity-options='{ "cellAlign": "left", "contain": true, "prevNextButtons": false, "wrapAround": true, "autoPlay": true}'> <?php foreach ($queried_posts as $post) { setup_postdata($post); echo '<a class="gallery-cell m-prf ratio-4-3 overlay" href="' . get_the_permalink() . '" title="' . get_the_title() . '">'; if (function_exists('makeitSrcset') && has_post_thumbnail()) { makeitSrcset(get_post_thumbnail_id($post->ID), 83, 62, 39, 34, 28); } echo '<h3 class="a-medium a-prf-text">' . get_the_title(); echo '<br/>'; echo '<span class="a-prf-text__span">'; echo get_the_time('Y-m-d'); if (has_tag()) { echo strip_tags(get_the_tag_list(' · ', ' · ', '')); } echo '</span>'; echo '</h3>'; echo '</a>'; } ?> </section> <?php wp_reset_postdata(); }
<a class="l-clearfix js-tappy m-listitem__a" href="<?php the_permalink(); ?> " title="<?php the_title_attribute(); ?> "> <?php if (function_exists('makeitSrcset') && has_post_thumbnail()) { makeitSrcset(get_post_thumbnail_id($post->ID), 90, 89, 25, 21, 20, 'm-prf ratio-16-9 listitem__img'); } elseif (has_post_thumbnail()) { the_post_thumbnail(); } the_title('<h3 class="a-medium a-listitem-title">', '</h3>'); ?> <p class="a-fineprint a-listitem-excerpt<?php echo has_post_thumbnail() ? ' has-thumb' : ''; ?> "> <span class="a-listitem-meta-date"> <?php the_time('Y-m-d'); if (has_tag()) { echo strip_tags(get_the_tag_list(' · ', ' · ', '')); } ?> </span> <br/> <?php echo get_the_excerpt(); ?>
?> <article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <?php get_template_part('partials/singular/singular-header'); if (function_exists('get_field') && get_field('video_embed_code') && has_post_format('video')) { echo '<section id="js-video-embed">'; the_field('video_embed_code'); echo '</section>'; } elseif (function_exists('makeitSrcset') && has_post_thumbnail()) { makeitSrcset(get_post_thumbnail_id($post->ID), 100, 100, 100, 100, 100, 'm-prf'); } elseif (has_post_thumbnail()) { the_post_thumbnail(); } get_template_part('partials/singular/singular-content'); get_template_part('partials/singular/singular-aside'); ?> </article> <?php } ?> </main> <?php get_footer();
<?php if (function_exists('get_field')) { if (get_field('options_ccard_profilepic', 'option') && function_exists('makeitSrcset')) { makeitSrcset(get_field('options_ccard_profilepic', 'option'), 50, 30, 20, 13, 22, 'm-prf avatar m-ccard-avatar'); } else { echo '<script>console.log("Lägg till en bild via wp-admin / options (minst 620px bred). Se till att plugin Make it Srcset är aktiverad / konfigurerad.")</script>'; } if (get_field('options_ccard_profilebio', 'option')) { echo '<div class="a-ccard__bio">'; //echo get_field('options_ccard_profilebio', 'option'); echo acf_tag_stripper('options_ccard_profilebio', false, true); echo '</div>'; } }