<?php namespace Yoast\YoastCom\Theme; $categories = array(); if (isset($template_args['categories'])) { $categories = $template_args['categories']; } $args = array('posts_per_page' => 25, 'orderby' => 'menu_order', 'order' => 'ASC'); if (!empty($categories)) { $args['tax_query'] = array(array('taxonomy' => 'yoast_plugin_category', 'field' => 'term_id', 'terms' => $categories)); } $plugins = query_plugins($args); while ($plugins->have_posts()) { $plugins->the_post(); ?> <a href="<?php the_permalink(); ?> " class="more"> <?php $icon = get_product_icon(); ?> <?php if ($icon) { ?> <img src="<?php echo esc_url($icon); ?> " class="more__plug show-on-desktop" width="40" height="40" /> <?php
<?php namespace Yoast\YoastCom\Theme; $plugins = query_plugins(array('posts_per_page' => 2, 'orderby' => 'rand', 'tax_query' => array(array('taxonomy' => 'yoast_plugin_category', 'field' => 'term_id', 'terms' => array(303, 407))))); $i = 0; while ($plugins->have_posts()) { $plugins->the_post(); ?> <?php $icon = get_product_icon(); ?> <a href="<?php the_permalink(); ?> " class="more color-academy"> <?php if ($icon && 0 === $i % 2) { ?> <img src="<?php echo esc_url($icon); ?> " class="more__plug show-on-desktop" width="40" height="40" /> <?php } ?> <div class="more__holder arrowed-small"> <div class="more__title"><?php the_title(); ?> </div>
<?php namespace Yoast\YoastCom\Theme; $category = ''; if (isset($template_args['category'])) { $category = $template_args['category']; } $plugins = query_plugins(array('post_type' => 'yoast_plugins', 'posts_per_page' => 25, 'orderby' => 'menu_order', 'order' => 'ASC', 'post__not_in' => array(302), 'tax_query' => array(array('taxonomy' => 'yoast_plugin_category', 'field' => 'slug', 'terms' => $category)))); $term = get_term_by('slug', $category, 'yoast_plugin_category'); ?> <div class="one-third"> <div class="promoblock arrowed-small"> <h2 class="h4"><?php echo esc_html($term->name); ?> </h2> <p class="hide-on-mobile"> <?php echo esc_html($term->description); ?> </p> <ul class="list list--unstyled list--plugin hide-on-mobile"> <?php while ($plugins->have_posts()) { $plugins->the_post(); ?> <li> <a href="<?php