Current Path : /var/www/ooareogundevinitiative/wp-content/themes/pain/framework/shortcodes/donation_grid/ |
Current File : /var/www/ooareogundevinitiative/wp-content/themes/pain/framework/shortcodes/donation_grid/tpl3.php |
<div class="tbdonations_special_wrap tpl1 <?php echo esc_attr($class_columns) ?>"> <article <?php post_class(); ?>> <div class="donation-item"> <?php if (has_post_thumbnail()) { ?> <div class="donation-thumbnail"> <?php $attachment_full_image = ''; $attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full', false); $attachment_full_image = $attachment_image[0]; if(function_exists('mr_image_resize')) { $image_resize = mr_image_resize($attachment_image[0], $width_image, $height_image, true, false); echo '<img class="cropped" src="' . esc_url($image_resize) . '" alt="image">'; } } ?> <div class="donation-overlay"> <div class="donate-meta"> <?php if($show_donation_money) { ?> <div class="donation-money"> <?php if($symbol_position != 1) { $raised_item = $symbol.number_format($result['raised']); } else { $raised_item = number_format($result['raised']).$symbol; } echo '<span class="box_money raised">'.__(' Donation Raise ', 'pain').'<span class="amount">'.$raised_item.'</span></span>'; ?> </div> <?php } ?> <div class="related-donation"> <?php $donation_cats = wp_get_post_terms( get_the_ID(), 'tbdonationcategory' ); if ( $donation_cats && ! is_wp_error ( $donation_cats ) ){ $single_cat = array_shift( $donation_cats ); } $related_donation = array( 'posts_per_page' => 3, 'orderby' => $orderby, 'order' => $order, 'post_type' => 'tbdonations', 'post_status' => 'publish', 'exclude' => get_the_ID(), 'tax_query' => array( array( 'taxonomy' => 'tbdonationcategory', 'field' => 'id', 'terms' => $single_cat->term_id ) )); $wp_related_donation = get_posts($related_donation); if ( !empty($wp_related_donation)) { ?> <ul> <?php foreach ($wp_related_donation as $k => $vl) { ?> <li><i class="fa fa-caret-right" aria-hidden="true"></i><a href="<?php echo get_home_url().'/'.$vl->post_name; ?>"><?php echo esc_html($vl->post_title) ?></a></li> <?php } ?> </ul> <?php } ?> </div> </div> </div> </div> <div class="donation-content"> <div class="donation-days-left"> <span> <?php if($days_left > 0) { echo __('Starting ', 'pain').$start_date.'<span class= "space"> - </span>'.__('Closing ', 'pain').date( 'd M o', $end_date_col ); }else { _e('Ended', 'pain'); } ?> </span> </div> <?php if($show_title) { ?> <h3 class="donation-title jw-text-ellipsis"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </h3> <?php } ?> <div class="donation-excerpt"><?php echo jwstheme_custom_excerpt($excerpt_lenght, $excerpt_more); ?></div> <div class="donation-category"> <a href="<?php echo get_term_link($single_cat->term_id);?>"itemprop="name" class="product_category_title"><span><?php echo esc_html($single_cat->name) ?></span></a> </div> </div> </div> </article> </div>