if (post_type_exists('testimonials')) { $query_args = array('post_type' => 'testimonials', 'posts_per_page' => (int) $count, 'order' => $order, 'orderby' => $orderby, 'post_status' => 'publish'); // Narrow by categories if ($categories != '') { $categories = explode(",", $categories); $query_args['tax_query'] = array(array('taxonomy' => 'testimonials-category', 'field' => 'slug', 'terms' => $categories)); } $testimonials = new WP_Query($query_args); // check if testimonials exists if ($testimonials->have_posts()) { if ($css_animation_type == 'iconbox') { $el_class1 = brad_getCSSAnimation($css_animation); $el_class2 = ''; } else { $el_class1 = ''; $el_class2 = brad_getCSSAnimation($css_animation); } $i = 1; while ($testimonials->have_posts()) { $testimonial_class = 'span12'; $ex_class5 = ''; $testimonials->the_post(); $person = get_post_meta($post->ID, 'brad_testimonial_name', true); $company = get_post_meta($post->ID, 'brad_testimonial_company', true); $person_role = get_post_meta($post->ID, 'brad_testimonial_role', true); $company_link = get_post_meta($post->ID, 'brad_testimonial_company_link', true); $testm_width = get_post_meta($post->ID, 'brad_testm_width', true); $img_src = ''; if ($appearance != 'carousel') { $testimonial_class = !empty($testm_width) && $masonry == 'yes' ? $testm_width : brad_get_class_name($columns); }
<?php /* Portfolio --------------------------------------------------*/ //global Variables global $post, $brad_includes; //Portfolio Id $portfolio_id = rand(); //Output Buffer $output = $style = ''; extract(shortcode_atts(array('categories' => '', 'columns' => 2, 'vpadding' => 'default', 'portfolio_style' => 'style1', 'info_onhover' => 'yes', 'padding' => '', 'sortable' => 'no', 'sortable_style' => '', 'sortable_align' => '', "bg_style" => 'white', 'sortable_label' => 'no', 'fullwidth' => 'no', 'show_lb_icon' => 'no', 'tabs_scheme' => 'scheme1', 'show_li_icon' => 'no', 'en_loveit' => 'no', 'disable_li_title' => 'no', 'css_animation' => '', 'divider' => 'no', 'di_style' => 'style1', 'di_color' => 'default', 'di_type' => 'tiny', 'css_animation_delay' => '0', 'max_items' => 8, 'info_style' => "default", 'orderby' => 'date', 'order' => 'DESC', 'masonry' => 'no', 'pagination' => 'default', 'img_size' => '', 'custom_img_size' => '', 'button_style' => '', 'lm_title' => __('Load More', 'brad-framework'), 'icon' => '', 'show_categories' => 'no', 'el_class' => ''), $atts)); //Extra Class $el_class = $this->getExtraClass($el_class); $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'row-fluid portfolio-items bg-style-' . $bg_style . ' sortable-items portfolio-' . $portfolio_style . ' columns-' . $columns . ' love-it-' . $en_loveit . ' enable-hr-' . $divider . ' hr-type-' . $di_type . ' hr-color-' . $di_color . ' hr-style-' . $di_style . ' element-padding-' . $padding . ' info-style-' . $info_style . ' element-vpadding-' . $vpadding . ' info-onhover-' . $info_onhover . ' ' . $el_class, $this->settings['base']); $css_class .= brad_getCSSAnimation($css_animation); $page = get_query_var('paged') ? get_query_var('paged') : get_query_var('page'); if (!$page) { $page = 1; } $query_args = array('post_type' => 'portfolio', 'posts_per_page' => (int) $max_items, 'paged' => $page, 'order' => $order, 'orderby' => $orderby, 'post_status' => 'publish'); // Narrow by categories if ($categories != '') { $category_query = explode(",", $categories); $query_args['tax_query'] = array(array('taxonomy' => 'portfolio_category', 'field' => 'slug', 'terms' => $category_query)); } $portfolios = new WP_Query($query_args); //check if already ready a infinite scroll post or portfolio in this page if ($brad_includes['load_infiniteScroll'] == true && ($pagination == 'if_scroll' || $pagination == 'loadmore')) { $output .= '<p>' . __('Sorry You cannot create more than 1 infinite scroll or Load More Posts ( Portfolios ) per page . Please change this in page builder ', 'brad') . '</p>'; } else { // check if portfolios exists
} $output .= "}"; } $output .= "</style>"; } $clients_loop = ''; $i = 1; while ($clients->have_posts()) { $clients->the_post(); $title = get_the_title($post->ID); $link = get_post_meta($post->ID, 'brad_client_link', true); $logo_id = preg_replace('/[^\\d]/', '', get_post_meta($post->ID, 'brad_client_image', true)); $logo_hover = preg_replace('/[^\\d]/', '', get_post_meta($post->ID, 'brad_client_hover', true)); if ($logo_id != '') { $logo = wpb_getImageBySize(array('attach_id' => $logo_id, 'thumb_size' => $img_size)); $clients_loop .= '<div class="span"><div class="inner-content ' . brad_getCSSAnimation($css_animation) . '" data-animation-delay="' . intval($css_animation_delay * $i) . '" data-animation-effect="' . $css_animation . '">'; if ($link != '') { $link_before = '<a class="clients-wrapper" href="' . $link . '" title="' . $title . '">'; $link_after = '</a>'; } else { $link_before = '<div class="clients-wrapper">'; $link_after = '</div>'; } $clients_loop .= $link_before . '<span>' . $logo['thumbnail'] . '</span>'; if ($logo_hover != '') { $logo = wpb_getImageBySize(array('attach_id' => $logo_hover, 'thumb_size' => 'full')); $clients_loop .= '<span class="hover-logo">' . $logo['thumbnail'] . '</span>'; } $clients_loop .= $link_after . '</div></div>'; } $i++;