// Shortcode to display affiliate link (with custom link text) function pward_display_affiliate_link_shortcode($atts) { global $post; // Get the affiliate link and custom link text $afflink = get_post_meta($post->ID, 'pward_afflink', true); $link_text = get_post_meta($post->ID, 'pward_afflink_text', true); // Get the custom link text // Use default text if no custom text is provided if (!$link_text) { $link_text = 'Click to buy'; // Default text if no link text is provided } // If an affiliate link exists, display it with the custom text if ($afflink) { return '' . esc_html($link_text) . ''; } return ''; // Return nothing if no affiliate link exists } add_shortcode('affiliate_link', 'pward_display_affiliate_link_shortcode'); // Shortcode to display related items beneath posts function pward_display_items_beneath_posts_shortcode($atts) { global $post; if ("post" === get_post_type() && is_singular()) { $post_id = $post->ID; $terms = wp_get_post_terms($post_id, 'pward_event', array("fields" => "all")); if (!empty($terms)) { $termargs = array(); $term_title = ""; foreach ($terms as $term) { array_push($termargs, $term->term_id); if (!$term_title) { $term_title = $term->name; } } $itemargs = array( 'post_type' => 'pward_item', 'tax_query' => array( array( 'taxonomy' => 'pward_event', 'field' => 'id', 'terms' => $termargs ) ) ); $itemquery = new WP_Query($itemargs); if ($itemquery->have_posts()) { $output = '
'; $output .= '

Kate Wore:

'; while ($itemquery->have_posts()) { $itemquery->the_post(); $output .= '
'; if (has_post_thumbnail()) { $output .= get_the_post_thumbnail(get_the_ID(), 'item-small-related'); } $output .= '

' . get_the_title() . '

'; // Get the custom link text from the Item CPT and display it $afflink = get_post_meta(get_the_ID(), 'pward_afflink', true); $link_text = get_post_meta(get_the_ID(), 'pward_afflink_text', true); // Get custom link text for each item if (!$link_text) { $link_text = 'Click to buy'; // Use default if not set } if ($afflink) { $output .= '' . esc_html($link_text) . ''; } $output .= '
'; } $output .= '
'; wp_reset_postdata(); return $output; } } } } add_shortcode('related_items_beneath_posts', 'pward_display_items_beneath_posts_shortcode'); // Shortcode to display related posts beneath items function pward_display_posts_beneath_items_shortcode($atts) { global $post; if ("pward_item" === get_post_type() && is_singular()) { $post_id = $post->ID; $terms = wp_get_post_terms($post_id, 'pward_event', array("fields" => "all")); if (!empty($terms)) { $termargs = array(); $itemtitle = get_the_title(); foreach ($terms as $term) { array_push($termargs, $term->term_id); } $postargs = array( 'post_type' => 'post', 'tax_query' => array( array( 'taxonomy' => 'pward_event', 'field' => 'id', 'terms' => $termargs ) ) ); $postquery = new WP_Query($postargs); if ($postquery->have_posts()) { $output = '
'; $output .= '

Events Where Kate Wore Her ' . esc_html($itemtitle) . '

'; while ($postquery->have_posts()) { $postquery->the_post(); $output .= '
'; $output .= '

' . get_the_title() . '

'; $output .= ''; $output .= '
'; } $output .= '
'; wp_reset_postdata(); return $output; } } } } add_shortcode('related_posts_beneath_items', 'pward_display_posts_beneath_items_shortcode'); Kate Middleton's Latest Blue Outfits — Dresses, Coats, Sweaters etc

Kate Middleton Style Blog

Kate Middleton Wearing Blue

Step into Kate Middleton’s wardrobe and discover her latest blue outfits.  The archive below shows the Princess of Wales wearing gorgeous blue coats, dresses and suits at recent public engagements. 

Click on any post below to discover more photos and details about her latest blue ensembles.

Looking for Kate’s iconic blue Issa ‘engagement’ dress (pictured above)? Click here.


The British Bag Brands Kate Middleton Carries On Repeat

Kate’s handbag collection is full of covetable designs from some of the UK’s most beloved brands. Join us as we take a closer look: