<article id="post-<?php the_ID(); ?> " <?php post_class("cmo-post-in-list"); ?> > <div class="cmo-article-featured-wrapper"> <div class="cmo-article-stretcher"> <?php $cmo_first_quote = cmo_extract_first_blockquote(get_the_content()); if ($cmo_first_quote) { ?> <div class="cmo-article-quote-wrapper"> <?php echo cmo_do_kses($cmo_first_quote); ?> <div class="cmo-article-icon"><i class="fa fa-quote-right"></i></div> </div> <?php } ?> </div> </div> <div class="cmo-article-contents"> <div class="cmo-article-meta-wrapper"> <h2><a href="<?php echo get_permalink(get_the_ID()); ?> "><?php the_title();
function cmo_get_wc_mini_cart($cart_style = 1) { global $woocommerce; $str = '<div id="nav-shopping-cart-wrapper"><a id="nav-link-cart" href="' . esc_url($woocommerce->cart->get_cart_url()) . '">'; if ($cart_style === 1) { $str .= '<span class="img-cart-icon">'; } else { $str .= esc_html__("In the Cart", 'cumulo') . '<span class="et-line icon-basket"></span>'; } if ($woocommerce->cart->cart_contents_count > 0) { $str .= '<span class="cart-items-count">' . intval($woocommerce->cart->cart_contents_count) . '</span>'; if ($cart_style === 1) { $str .= "</span>"; } $str .= '</a><ul class="sub-menu right-aligned">'; foreach ($woocommerce->cart->get_cart() as $cart_item_key => $item) { $_product = $item['data']->post; $_price = get_post_meta($item['product_id'], '_price', true); $_thumb = wp_get_attachment_image_src(get_post_thumbnail_id($item['product_id']), 'thumbnail'); $thumburl = $_thumb[0]; if (empty($_thumb) || empty($_thumb[0])) { $thumburl = wc_placeholder_img_src(); } $str .= "<li>"; $str .= "<a href=" . get_permalink($_product->ID) . " class='cart-item-thumb'><img src='" . esc_url($thumburl) . "' class='cart-item-thumb' alt='image-thumb' /></a>"; $str .= "<a href=" . get_permalink($_product->ID) . " class='cart-item-title'>" . cmo_do_kses($_product->post_title) . "</a>"; $str .= "<span class='cart-item-desc'><span class='cart-item-qty'>" . intval($item['quantity']) . "</span>x<span class='cart-item-price'>" . wc_price($_price) . "</span></span>"; $str .= sprintf('<a href="%s" class="nav-remove-item" title="%s">×</a>', esc_url($woocommerce->cart->get_remove_url($cart_item_key)), __('Remove this item', 'cumulo')); $str .= "</li>"; } $str .= "<li class='cart-other-pages'><a href='" . esc_url($woocommerce->cart->get_cart_url()) . "' class='nav-woo-view-cart'>View Cart</a><a href='" . esc_url($woocommerce->cart->get_checkout_url()) . "' class='nav-woo-checkout'>Checkout</a></li>"; $str .= '</ul></div>'; } else { if ($cart_style === 1) { $str .= "</span>"; } $str .= '</a></div>'; } return $str; }
<article id="post-<?php the_ID(); ?> " <?php post_class("cmo-post-in-list"); ?> > <?php $cmo_first_anchor = cmo_extract_first_anchor(get_the_content()); if ($cmo_first_anchor) { ?> <div class="cmo-article-link-wrapper"> <div class="cmo-article-link-title"><?php echo cmo_do_kses($cmo_first_anchor[0]); ?> </div> <div class="cmo-article-icon"><i class="fa fa-link"></i></div> </div> <div class="cmo-article-link-href"><?php echo esc_url($cmo_first_anchor[1]); ?> </div> <?php } ?> <div class="cmo-article-contents"> <div class="cmo-article-meta-wrapper"> <a class="cmo-article-meta-date" href="<?php echo get_permalink(get_the_ID()); ?> ">
<div class="cmo-article-author-info"> <div class="cmo-article-author-name h4"> <?php _e("Author - ", 'cumulo'); the_author_posts_link(); if (is_super_admin(get_the_author_meta('ID'))) { echo "<span class='is-admin'>"; _e("Admin", "cumulo"); echo "</span>"; } ?> </div> <?php $cmo_desc = get_the_author_meta("description"); if (!empty($cmo_desc)) { echo "<p>" . cmo_do_kses($cmo_desc) . "</p>"; } else { echo "<p>" . __("No Description", 'cumulo') . "</p>"; } ?> </div> </div> <?php if (comments_open() || get_comments_number()) { comments_template(); } ?> <?php } else {