Forum Replies Created
-
AuthorPosts
-
FocuxTheme Support
KeymasterTry to release the next version within this week, at least after I figure out the product grid overlapping issue which you mentioned.
Thanks
You must have valid license to access this content.April 20, 2017 at 4:40 pm in reply to: Go Straight to Portfolio Details Instead of Showing a Lighbox #11535You must have valid license to access this content.You must have valid license to access this content.You must have valid license to access this content.You must have valid license to access this content.You must have valid license to access this content.You must have valid license to access this content.You must have valid license to access this content.FocuxTheme Support
KeymasterYou have to redefine the EDD product grid function which is located in the ThemeVan shortcodes plugin /elements/edd_product_grid.php
For example, copy the following changed function to the theme functions.php (Using child theme is better)
function custom_vc_edd_product_grid( $atts) { static $tmvs_custom_loop; global $post; wp_enqueue_script( 'imagesLoaded'); wp_enqueue_script( 'isotope'); wp_enqueue_script( 'masonry' ); if( !isset($tmvs_custom_loop) ) $tmvs_custom_loop = 1; else $tmvs_custom_loop ++; $atts = shortcode_atts( array( 'paging' => 'paginate'. $tmvs_custom_loop, 'post_type' => 'download', 'posts_per_page' => '10', 'post_status' => 'publish', 'download_category' => '', 'columns' => 3, 'template' => 'item-grid', 'pagination' => 'no', 'filter_type' => 'no', 'hide_price' => 'no', 'hide_buy_now_button' => 'no', 'orderby' => 'date', 'extra_class' => '', 'css_animation' => '', ), $atts ); $paging = $atts['paging']; unset( $atts['paging'] ); $pagination = $atts['pagination']; unset( $atts['pagination'] ); $hide_price = $atts['hide_price']; unset( $atts['hide_price'] ); $hide_buy_now_button = $atts['hide_buy_now_button']; unset( $atts['hide_buy_now_button'] ); $template = $atts['template']; unset( $atts['template'] ); $template_class=''; $gutter=15; $thumbnail_size=array(800,500); if($template=='picture-masonry'){ $template_class='tmvs-masonry'; $thumbnail_size='large'; $gutter=0; }elseif($template=='picture-grid'){ $template_class='tmvs-picture-grid'; } $columns = $atts['columns']; unset( $atts['columns'] ); $column_class='three_columns'; if($columns==2){ $column_class='two_columns'; } $filter_type = $atts['filter_type']; unset( $atts['filter_type'] ); if( isset($_GET[$paging]) ) $atts['paged'] = $_GET[$paging]; else $atts['paged'] = 1; $product_grid_object_id=tmvs_random_string(10); $custom_query = new WP_Query( $atts ); $pagination_base = add_query_arg( $paging, '%#%'); $html =''; if( $custom_query->have_posts() ): if($filter_type=='filter'){ $html = tmvs_category_filter($product_grid_object_id,'download_category',$atts['download_category'],false); }elseif($filter_type=='category'){ $html = tmvs_categories('download_category','',false); }else{ $html=''; } $html .= '<div id="tmvs-products-grid-'.$product_grid_object_id.'" class="tmvs-grid '.$template_class.' '.$column_class.'">'; while( $custom_query->have_posts()) : $custom_query->the_post(); $terms = get_the_terms($post->ID,'download_category'); $slug=array(); if ( $terms && ! is_wp_error( $terms ) ){ foreach($terms as $term) { $slug[] = $term->slug; } } $on_slug = join( " ", $slug); $price=esc_attr(get_post_meta($post->ID, "edd_price", true)); $preview=esc_attr(get_post_meta($post->ID, "_dgwork_preview_url", true)); $short_description=esc_attr(get_post_meta($post->ID, "_dgwork_short_description", true)); $button_text=esc_attr__('Buy Now','tmvs'); $freelabel = ''; $html .= '<div class="post '.$on_slug.'">'.$freelabel.' <div class="tmvs-grid-item"> <div class="image-box"> '.get_the_post_thumbnail($post->ID,$thumbnail_size,array('alt'=>esc_attr(get_the_title()))).' </div>'; if($template=='item-grid'){ $html .= '<div class="text-desc">'; if($hide_price<>'yes'){ $html .= edd_price($post->ID,false).' <span class="divider"></span>'; } if($hide_price=='yes'){ $html .= '<p>'; } $html.='<a href="'.esc_url(get_permalink()).'" class="button details"><i class="fa fa-eye"></i>'.esc_attr__('Details','tmvs').'</a>'; if($hide_buy_now_button=='no'){ if(esc_attr(get_post_meta($post->ID, "_dgwork_external_checkout_url", true))<>''){ $html .= '<a href="'.esc_url(get_post_meta($post->ID, "_dgwork_external_checkout_url", true)).'" class="external-checkout button" target="_blank"><i class="fa fa-download"></i>'.esc_attr($button_text).'</a>'; }else{ $html .= '<a href="'.home_url('/').'checkout?edd_action=add_to_cart&download_id='.$post->ID.'" class="button add_to_cart"><i class="fa fa-shopping-cart"></i> '.esc_attr($button_text).'</a>'; } } if($hide_price=='yes'){ $html .= '</p>'; } $html .= '</div>'; }else{ $html .= '<div class="text-desc"> <a href="'.esc_url(get_permalink()).'" class="title">'.esc_attr__(get_the_title()).'</a> <span class="divider"></span> <a href="'.esc_url(get_permalink()).'" class="icon"><i class="fa fa-search-plus"></i></a> </div>'; } $html.='</div>'; if($template=='item-grid'){ $html.='<h3 class="tmvs-grid-title"><a href="'.esc_url(get_permalink()).'" title="'.esc_attr(get_the_title()).'">'.esc_attr(get_the_title()).'</a></h3> <p class="tmvs-grid-subtitle">'.tmvs_truncate($short_description,120).'</p>'; } $html.='</div>'; endwhile; $html.='</div><div class="clear"></div>'; if($pagination=='yes'): $html .= '<div class="tmvs_pagenavi">'; $html .= paginate_links( array( 'type' => '', 'base' => $pagination_base, 'format' => '?'. $paging .'=%#%', 'current' => max( 1, $custom_query->get('paged') ), 'total' => $custom_query->max_num_pages )); $html.='</div>'; endif; $html.="<script type='text/javascript'> jQuery(document).ready(function($){ $('#nav-filter-".$product_grid_object_id." li').on('click',function(){ var selector = $(this).attr('data-filter'); var product_grid_container=$('#tmvs-products-grid-".$product_grid_object_id."'); product_grid_container.isotope({ animationEngine: 'css', filter: selector, masonry: { gutter: ".$gutter." } }); $(this).attr('class','active'); $(this).siblings().removeAttr('class'); return false; }); }); </script>"; endif; return $html; }If you are not in a hurry, I will add a new option to hide the ‘free circle’.
-
AuthorPosts
