while ($loop->have_posts()) {
     $loop->the_post();
     $terms = get_the_terms(get_the_ID(), 'st_service_cat');
     $datatype = array();
     foreach ($terms as $term) {
         $datatype[] = $term->slug;
     }
     $col_class = $column_class . ' ' . @implode(' ', $datatype);
     echo '<div class="' . esc_attr($col_class) . '">';
     $service_icon = get_post_meta(get_the_ID(), '_st_service_icon', TRUE);
     $service_icon_image = get_post_meta(get_the_ID(), '_st_service_icon_image', TRUE);
     switch ($style) {
         case 2:
             echo '<div class="service-container style-' . intval($style) . '">';
             echo '<div class="service-image">';
             echo '<a href="' . get_permalink() . '">' . builtpress_thumbnail('builtpress-service') . '</a>';
             echo '</div>';
             echo '<div class="service-content">';
             echo '<h4><a href="' . get_permalink() . '">' . get_the_title() . '</a></h4>';
             echo '<div>' . get_the_excerpt() . '</div>';
             echo '<div class="service-link"><a href="' . get_permalink() . '">' . esc_attr($link_label) . '</a></div>';
             echo '</div>';
             echo '<div class="clearfix"></div>';
             echo '</div>';
             break;
         default:
             echo '<div class="service-container style-' . intval($style) . '">';
             if (!empty($service_icon_image)) {
                 echo '<div class="service-image">';
                 echo '<span>' . wp_get_attachment_image($service_icon_image, 'thumbnail') . '</span>';
                 echo '</div>';
<?php

extract(shortcode_atts(array('category' => '', 'number' => '-1'), $atts));
if (!empty($category)) {
    $args = array('post_type' => 'st_testimonial', 'posts_per_page' => intval($number), 'tax_query' => array(array('taxonomy' => 'st_testimonial_cat', 'field' => 'term_id', 'terms' => intval($category))));
    $loop = new WP_Query($args);
} else {
    $loop = new WP_Query('post_type=st_testimonial&order=ASC&posts_per_page=' . intval($number));
}
if ($loop->have_posts()) {
    echo '<div class="st-testimonial-slider owl-carousel">';
    while ($loop->have_posts()) {
        $loop->the_post();
        $testimonial_position = get_post_meta(get_the_ID(), '_st_testimonial_position', TRUE);
        echo '<div class="testimonial-container">';
        echo '<div class="testimonial-content">' . get_the_excerpt() . '</div>';
        echo '<div class="testimonial-photo">' . builtpress_thumbnail('builtpress-testimonial') . '</div>';
        echo '<div class="testimonial-meta">';
        echo '<h4>' . get_the_title() . '</h4>';
        echo '<span class="testimonial-position">' . esc_attr($testimonial_position) . '</span>';
        echo '</div>';
        echo '</div>';
    }
    echo '</div>';
    wp_reset_postdata();
}
             echo '<a href="' . get_permalink() . '">';
             echo builtpress_thumbnail('builtpress-portfolio');
             echo '<div class="zoom-overlay"></div>';
             echo '</a>';
             echo '</div>';
             echo '<div class="portfolio-content">';
             echo '<h4><a href="' . get_permalink() . '">' . get_the_title() . '</a></h4>';
             echo '</div>';
             echo '<div class="clearfix"></div>';
             echo '</div>';
             break;
         case 1:
         default:
             echo '<div class="portfolio-container style-' . intval($style) . '">';
             echo '<div class="portfolio-image">';
             echo builtpress_thumbnail('builtpress-portfolio');
             echo '<div class="zoom-overlay"></div>';
             echo '</div>';
             echo '<div class="portfolio-content">';
             echo '<h4>' . get_the_title() . '</h4>';
             echo '<div class="portfolio-link"><a href="' . get_permalink() . '">' . esc_attr($link_label) . '</a></div>';
             echo '</div>';
             echo '<div class="clearfix"></div>';
             echo '</div>';
             break;
     }
     echo '</article>';
 }
 echo '</div>';
 if ($load_more == 'yes') {
     echo '<div class="load-more load-' . $portfolioID . '">';
Esempio n. 4
0
if (!empty($category)) {
    $args = array('post_type' => 'st_team', 'orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => intval($number), 'tax_query' => array(array('taxonomy' => 'st_team_cat', 'field' => 'term_id', 'terms' => intval($category))));
    $loop = new WP_Query($args);
} else {
    $loop = new WP_Query('post_type=st_team&orderby=menu_order&order=ASC&posts_per_page=' . intval($number));
}
if ($loop->have_posts()) {
    echo '<div class="st-team">';
    echo '<div class="row">';
    while ($loop->have_posts()) {
        $loop->the_post();
        $team_position = get_post_meta(get_the_ID(), '_st_team_position', TRUE);
        echo '<div class="' . esc_attr($columnstospan) . '">';
        echo '<div class="team-container style-' . intval($style) . esc_attr($animate_class) . '">';
        echo '<div class="team-photo">';
        echo '<span>' . builtpress_thumbnail('builtpress-team') . '</span>';
        echo '<div class="team-content">';
        echo get_the_excerpt();
        echo builtpress_team_socials();
        echo '</div>';
        echo '</div>';
        echo '<div class="team-inner">';
        echo '<div class="team-meta">';
        echo '<h4>' . get_the_title() . '</h4>';
        echo '<span class="team-position">' . esc_attr($team_position) . '</span>';
        echo '</div>';
        echo '</div>';
        echo '</div>';
        echo '</div>';
    }
    echo '</div>';