function smittenkitchen_svg_icon_shortcode($atts, $content = null) { $a = shortcode_atts(array('name' => '', 'id' => ''), $atts); return smittenkitchen_get_icon($atts['name'], $atts['id']); }
?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php while (have_posts()) { the_post(); ?> <?php get_template_part('template-parts/content', 'single'); ?> <?php the_post_navigation(array('prev_text' => smittenkitchen_get_icon('arrow') . '<span>%title</span> ', 'next_text' => '<span>%title</span>' . smittenkitchen_get_icon('arrow'))); ?> <?php // If comments are open or we have at least one comment, load up the comment template. if (comments_open() || get_comments_number()) { comments_template(); } ?> <?php } // End of the loop. ?> </main><!-- #main -->
?> <header class="page-header"> <h1 class="page-title"> <?php the_archive_title(); ?> <?php // Display an icon to switch between viewing modes. if ('list' === get_query_var('format')) { $icon = smittenkitchen_get_icon('photo'); $params = array('format' => 'photo'); $title = esc_html('View as images', 'smittenkitchen'); } else { $icon = smittenkitchen_get_icon('list'); $params = array('format' => 'list'); $title = esc_html('View as a list', 'smittenkitchen'); } ?> <a class="format-switcher" href="<?php echo esc_url(add_query_arg($params)); ?> " title="<?php echo $title; ?> "><?php echo $icon; ?> </a>
<article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <header class="entry-header"> <div class="post-thumbnail-container"> <?php if (has_post_thumbnail()) { the_post_thumbnail('smittenkitchen-full'); } the_post_navigation(array('prev_text' => smittenkitchen_get_icon('arrow') . '<span class="screen-reader-text">' . esc_html__('Previous post:', 'smittenkitchen') . ' %title</span> ', 'next_text' => smittenkitchen_get_icon('arrow') . '<span class="screen-reader-text">' . esc_html__('Next post:', 'smittenkitchen') . ' %title</span>')); smittenkitchen_primary_category(); ?> </div> <?php the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>'); ?> <div class="entry-meta"> <?php smittenkitchen_posted_on(); ?> <span id="smittenkitchen-jump-links" class="jump-links"> <?php