function woocommerce_shop_thumbnail() { global $product, $woocommerce; $rating = $product->get_rating_html(); //get rating $cart_url = $woocommerce->cart->get_cart_url(); $output = "<div class='woocommerce_product_thumbnail'><div class='overlay'></div>"; $output .= get_aq_resize_img('full', 230, 280); $output .= woocommerce_add_to_cart_button(); if ($product->product_type == 'simple') { $output .= "<a href='{$cart_url}' class='woocommerce_cart_loading woocommerce_added_check'></a>"; } $output .= "</div>"; echo $output; }
function Vpanel_Questions($questions_per_page = 5, $orderby, $display_date, $questions_excerpt, $post_or_question, $excerpt_title = 5, $display_image = "on") { global $post; $date_format = vpanel_options("date_format") ? vpanel_options("date_format") : get_option("date_format"); $excerpt_title = $excerpt_title != "" ? $excerpt_title : 5; if ($orderby == "popular") { $orderby = array('orderby' => 'comment_count'); } elseif ($orderby == "random") { $orderby = array('orderby' => 'rand'); } else { $orderby = array(); } $query = new WP_Query(array_merge($orderby, array('post_type' => $post_or_question, 'ignore_sticky_posts' => 1, 'posts_per_page' => $questions_per_page, 'cache_results' => false, 'no_found_rows' => true))); if ($query->have_posts()) { echo "<ul class='related-posts'>"; while ($query->have_posts()) { $query->the_post(); ?> <li class="related-item"> <?php if (has_post_thumbnail() && $display_image == "on") { ?> <div class="author-img"> <a href="<?php the_permalink(); ?> " title="<?php printf('%s', the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php echo get_aq_resize_img('full', 60, 60); ?> </a> </div> <?php } ?> <div class="questions-div"> <h3> <a href="<?php the_permalink(); ?> " title="<?php printf('%s', the_title_attribute('echo=0')); ?> " rel="bookmark"> <?php if ($questions_excerpt == 0) { ?> <i class="icon-double-angle-right"></i> <?php } excerpt_title($excerpt_title); ?> </a> </h3> <?php if ($questions_excerpt != 0) { ?> <p><?php excerpt($questions_excerpt); ?> </p> <?php } if ($display_date == "on") { ?> <div class="clear"></div><span <?php echo $questions_excerpt == 0 ? "class='margin_t_5'" : ""; ?> ><?php the_time($date_format); ?> </span> <?php } ?> </div> </li> <?php } echo "</ul>"; } wp_reset_postdata(); }
?> </li> <?php } } ?> </ul> </div><!-- End flexslider --> <?php } } } } } else { if (has_post_thumbnail()) { if ($vbegy_sidebar == "full") { if ($blog_style == "blog_2") { echo get_aq_resize_img('full', 250, 160); } else { echo get_aq_resize_img('full', 1100, 600); } } else { if ($blog_style == "blog_2") { echo get_aq_resize_img('full', 250, 190); } else { echo get_aq_resize_img('full', 810, 450); } } } } }