Exemplo n.º 1
0
        function block($instance)
        {
            extract($instance);
            $width = AQ_Block::transform_span_to_gs($size);
            $randID = rand(1, 99);
            if (!empty($members)) {
                $args = array('post_type' => array('team'), 'showposts' => $limit, 'post__in' => $members);
            } else {
                $args = array('post_type' => array('team'), 'showposts' => $limit);
            }
            $wp_query = new WP_Query($args);
            ?>

             <div class="team showbiz-container">
                <h3 class="headline"><?php 
            echo $title;
            ?>
</h3>
                <span class="line" style="margin-bottom:0;"></span>

                <!-- Navigation -->
                <div class="showbiz-navigation">
                    <div id="showbiz_left_<?php 
            echo $randID;
            ?>
" class="sb-navigation-left"><i class="icon-angle-left"></i></div>
                    <div id="showbiz_right_<?php 
            echo $randID;
            ?>
" class="sb-navigation-right"><i class="icon-angle-right"></i></div>
                </div>
                <div class="clearfix"></div>

                <!-- Entries -->
                <div class="showbiz" data-left="#showbiz_left_<?php 
            echo $randID;
            ?>
" data-right="#showbiz_right_<?php 
            echo $randID;
            ?>
">
                    <div class="overflowholder">
                        <ul>
                         <?php 
            if ($wp_query->have_posts()) {
                while ($wp_query->have_posts()) {
                    $wp_query->the_post();
                    $id = $wp_query->post->ID;
                    $position = get_post_meta($id, 'pp_position', true);
                    $social = get_post_meta($id, 'pp_socialicons', true);
                    echo '<li>';
                    if (has_post_thumbnail()) {
                        echo '<a href="' . get_permalink() . '">';
                        echo get_the_post_thumbnail($wp_query->post->ID, 'portfolio-3col', array('class' => 'mediaholder team-img'));
                        echo "</a>";
                    }
                    echo '<div class="team-name"><h5><a href="' . get_permalink() . '">' . get_the_title() . '</a></h5> <span>' . $position . '</span></div>
                        <div class="team-about"><p>' . get_the_content() . '</p></div>';
                    if (!empty($social)) {
                        echo '<ol class="social-icons">';
                        foreach ($social as $icon) {
                            echo '<li><a class="' . $icon['icons_service'] . '" href="' . $icon['icons_url'] . '"><i class="icon-' . $icon['icons_service'] . '"></i></a></li>';
                        }
                        echo '</ol>';
                    }
                    echo '<div class="clearfix"></div></li>';
                }
                // close the Loop
            }
            wp_reset_query();
            ?>
    </ul>
    <div class="clearfix"></div>

</div>
<div class="clearfix"></div>

</div>
</div>
<?php 
        }
Exemplo n.º 2
0
        function block($instance)
        {
            extract($instance);
            $randID = rand(1, 99);
            $size = substr($size, 4);
            $insidewidth = $size - 2;
            $temp_width = "span" . floor($insidewidth);
            $new_witdh = AQ_Block::transform_span_to_gs($temp_width);
            ?>
            <!-- Headline -->
            <div>
                <h3 class="headline"><?php 
            echo $title;
            ?>
</h3>
                <span class="line" style="margin-bottom:0;"></span>
            </div>

            <!-- Navigation / Left -->
            <div class="one alpha carousel column"><div id="showbiz_left_<?php 
            echo $randID;
            ?>
" class="sb-navigation-left-2"><i class="icon-angle-left"></i></div></div>

            <!-- ShowBiz Carousel -->
            <div class="our-clients-cont showbiz-container <?php 
            echo $new_witdh;
            ?>
 carousel columns" >

            <!-- Portfolio Entries -->
            <div class="showbiz our-clients" data-left="#showbiz_left_<?php 
            echo $randID;
            ?>
" data-right="#showbiz_right_<?php 
            echo $randID;
            ?>
">
                <div class="overflowholder">

                    <ul>
                    <?php 
            $output = '';
            foreach ($clients as $client) {
                if ($client['url']) {
                    $output .= '<li><a href="' . $client['url'] . '"><img src="' . $client['image'] . '" alt="' . $client['title'] . '" /></a></li>';
                } else {
                    $output .= '<li><img src="' . $client['image'] . '" alt="' . $client['title'] . '" /></li>';
                }
            }
            echo $output;
            ?>

                    </ul>
                    <div class="clearfix"></div>

                </div>
                <div class="clearfix"></div>

            </div>
            </div>

            <!-- Navigation / Right -->
            <div class="one carousel omega column"><div id="showbiz_right_<?php 
            echo $randID;
            ?>
" class="sb-navigation-right-2"><i class="icon-angle-right"></i></div></div>

        <?php 
        }
Exemplo n.º 3
0
        function block($instance)
        {
            extract($instance);
            $width = AQ_Block::transform_span_to_gs($size);
            $randID = rand(1, 99);
            ?>
        <div class="">
            <h3 class="headline"><?php 
            echo $title;
            ?>
</h3>
            <span class="line" style="margin-bottom:0;"></span>
        </div>

        <!-- ShowBiz Carousel -->
        <div class="showbiz-container recent-work">

            <!-- Navigation -->
            <div class="showbiz-navigation">
                <div id="showbiz_left_<?php 
            echo $randID;
            ?>
" class="sb-navigation-left"><i class="icon-angle-left"></i></div>
                <div id="showbiz_right_<?php 
            echo $randID;
            ?>
" class="sb-navigation-right"><i class="icon-angle-right"></i></div>
            </div>
            <div class="clearfix"></div>

            <!-- Portfolio Entries -->
            <div class="showbiz" data-left="#showbiz_left_<?php 
            echo $randID;
            ?>
" data-right="#showbiz_right_<?php 
            echo $randID;
            ?>
">
              <div class="overflowholder">
                    <ul>
                        <?php 
            $args = array('post_type' => 'post', 'posts_per_page' => $limit, 'orderby' => $orderby, 'order' => $order);
            if ($categories) {
                $args['category__in'] = $categories;
            }
            if ($tags) {
                $args['tag__in'] = $tags;
            }
            $wp_query = new WP_Query($args);
            if ($wp_query->found_posts > 1) {
                $mfpclass = "mfp-gallery";
            } else {
                $mfpclass = "mfp-image";
            }
            if ($wp_query->have_posts()) {
                while ($wp_query->have_posts()) {
                    $wp_query->the_post();
                    ?>

                         <!-- Item -->
                        <li>
                            <div class="blog-item media">
                                <figure>
                                    <div class="mediaholder <?php 
                    if (!has_post_thumbnail()) {
                        echo "textholder";
                    }
                    ?>
">
                                        <?php 
                    $thumb = get_post_thumbnail_id();
                    $img_url = wp_get_attachment_url($thumb);
                    ?>
                                        <?php 
                    if (has_post_thumbnail()) {
                        ?>
                                          <a href="<?php 
                        the_permalink();
                        ?>
" title="<?php 
                        the_title();
                        ?>
">
                                                <?php 
                        the_post_thumbnail('portfolio-4col');
                        ?>
                                                <div class="hovercover">
                                                    <div class="hovericon"><i class="hoverlink"></i></div>
                                                </div>
                                            </a>
                                        <?php 
                    }
                    ?>
                                        <?php 
                    if (!has_post_thumbnail()) {
                        $excerpt = get_the_excerpt();
                        $short_excerpt = string_limit_words($excerpt, 30);
                        echo '<p>' . $short_excerpt . '..</p>';
                    }
                    ?>
                                    </div>

                                    <a href="<?php 
                    the_permalink();
                    ?>
">
                                        <figcaption class="item-description">

                                            <h5><?php 
                    the_title();
                    ?>
</h5>
                                            <span><?php 
                    $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
                    $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()));
                    echo $time_string;
                    ?>
</span>
                                        </figcaption>
                                    </a>

                                </figure>
                            </div>
                        </li>
                    <?php 
                }
                // close the Loop
            }
            ?>
                    </ul>
                    <div class="clearfix"></div>

                </div>
                <div class="clearfix"></div>

            </div>
        </div>
            <?php 
        }
Exemplo n.º 4
0
        function block($instance)
        {
            extract($instance);
            $width = AQ_Block::transform_span_to_gs($size);
            $randID = rand(1, 99);
            if (!empty($testimonials)) {
                $args = array('post_type' => array('testimonial'), 'showposts' => $limit, 'orderby' => $orderby, 'post__in' => $testimonials);
            } else {
                $args = array('post_type' => array('testimonial'), 'showposts' => $limit, 'orderby' => $orderby);
            }
            $wp_query = new WP_Query($args);
            if ($type == 'standard') {
                ?>
<div class="testimonials_wrap showbiz-container">
    <h3 class="headline"><?php 
                echo $title;
                ?>
</h3>
    <span class="line" style="margin-bottom:0;"></span>

    <!-- Navigation -->
    <div class="showbiz-navigation">
        <div id="showbiz_left_<?php 
                echo $randID;
                ?>
" class="sb-navigation-left"><i class="icon-angle-left"></i></div>
        <div id="showbiz_right_<?php 
                echo $randID;
                ?>
" class="sb-navigation-right"><i class="icon-angle-right"></i></div>
    </div>
    <div class="clearfix"></div>

    <!-- Entries -->
    <div class="showbiz" data-left="#showbiz_left_<?php 
                echo $randID;
                ?>
" data-right="#showbiz_right_<?php 
                echo $randID;
                ?>
">
        <div class="overflowholder">
            <ul>
               <?php 
                if ($wp_query->have_posts()) {
                    while ($wp_query->have_posts()) {
                        $wp_query->the_post();
                        $id = $wp_query->post->ID;
                        $author = get_post_meta($id, 'pp_author', true);
                        $link = get_post_meta($id, 'pp_link', true);
                        $position = get_post_meta($id, 'pp_position', true);
                        echo '<li class="testimonial">';
                        echo '<div class="testimonials">' . get_the_content() . '</div><div class="testimonials-bg"></div>';
                        if ($link) {
                            echo ' <div class="testimonials-author"><a href="' . $link . '">' . $author . '</a>';
                        } else {
                            echo ' <div class="testimonials-author">' . $author;
                        }
                        if ($position) {
                            echo ', <span>' . $position . '</span>';
                        }
                        echo '</div></li>';
                    }
                    wp_reset_query();
                    // close the Loop
                }
                ?>
            </ul>
            <div class="clearfix"></div>
        </div>
        <div class="clearfix"></div>
    </div>
</div>
<?php 
            } else {
                ?>
<div class="happywrapper ">
    <!-- Navigation / Left -->
    <div id="showbiz_left_<?php 
                echo $randID;
                ?>
" class="sb-navigation-left-2 alt"><i class="icon-angle-left"></i></div>

    <!-- ShowBiz Carousel -->
    <div id="happy-clients" class="happy-clients showbiz-container  carousel " >

        <!-- Portfolio Entries -->
        <div class="showbiz our-clients" data-left="#showbiz_left_<?php 
                echo $randID;
                ?>
" data-right="#showbiz_right_<?php 
                echo $randID;
                ?>
">
            <div class="overflowholder">
                <ul>
<?php 
                if ($wp_query->have_posts()) {
                    while ($wp_query->have_posts()) {
                        $wp_query->the_post();
                        $id = $wp_query->post->ID;
                        $author = get_post_meta($id, 'pp_author', true);
                        $link = get_post_meta($id, 'pp_link', true);
                        $position = get_post_meta($id, 'pp_position', true);
                        echo '<li>';
                        echo '<div class="happy-clients-photo">' . get_the_post_thumbnail($wp_query->post->ID, 'portfolio-thumb') . '</div>';
                        echo '<div class="happy-clients-cite">' . get_the_content() . '</div>';
                        if ($link) {
                            echo ' <div class="happy-clients-author"><a href="' . $link . '">' . $author . '</a>';
                        } else {
                            echo ' <div class="happy-clients-author">' . $author;
                        }
                        echo '</li>';
                    }
                    wp_reset_query();
                    // close the Loop
                }
                ?>
                </ul>
                <div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
    <div id="showbiz_right_<?php 
                echo $randID;
                ?>
" class="sb-navigation-right-2 alt"><i class="icon-angle-right"></i></div>
</div>
<?php 
            }
        }
Exemplo n.º 5
0
 function block($instance)
 {
     extract($instance);
     $size = substr($size, 4);
     $boxes_number = count($boxes);
     $columns = $size / $boxes_number;
     if ($boxes_number == 3 && $size == 16) {
         $new_col = "one-third";
     } else {
         $new_width = "span" . floor($columns);
         $new_col = AQ_Block::transform_span_to_gs($new_width);
     }
     $output = '';
     $count = 0;
     $posclass = '';
     foreach ($boxes as $box) {
         $count++;
         if ($count == 1) {
             $posclass = "alpha";
         } elseif ($count == $boxes_number) {
             $posclass = "omega";
         } else {
             $posclass = "";
         }
         $output .= '<div class="' . $new_col . ' ' . $posclass . ' columns">';
         if ($box['icon'] == 'none' && empty($box['upload'])) {
             $output .= '<div class="featured-box no-margin">';
         } else {
             $output .= '<div class="featured-box">';
         }
         if (!empty($box['upload'])) {
             $output .= '<div class="circle-image"><img src="' . $box['upload'] . '"/></div>';
         } else {
             if ($box['icon'] != 'none') {
                 $output .= '<div class="' . $box['style'] . '"><i class="' . $box['icon'] . '"></i><span></span></div>';
             }
         }
         $output .= '<div class="featured-desc">';
         if (isset($box['url']) && !empty($box['url'])) {
             $output .= '<h3><a href="' . $box['url'] . '">' . $box['title'] . '</a></h3>';
         } else {
             $output .= '<h3>' . $box['title'] . '</h3>';
         }
         $output .= wpautop(do_shortcode(htmlspecialchars_decode($box['content'])));
         $output .= '</div>';
         $output .= '</div>';
         $output .= '</div>';
     }
     echo $output;
 }
Exemplo n.º 6
0
        function block($instance)
        {
            extract($instance);
            $width = AQ_Block::transform_span_to_gs($size);
            $randID = rand(1, 99);
            ?>
        <div class="">
            <h3 class="headline"><?php 
            echo $title;
            ?>
</h3>
            <span class="line" style="margin-bottom:0;"></span>
        </div>

        <!-- ShowBiz Carousel -->
        <div class="showbiz-container recent-work">

            <!-- Navigation -->
            <div class="showbiz-navigation">
                <div id="showbiz_left_<?php 
            echo $randID;
            ?>
" class="sb-navigation-left"><i class="icon-angle-left"></i></div>
                <div id="showbiz_right_<?php 
            echo $randID;
            ?>
" class="sb-navigation-right"><i class="icon-angle-right"></i></div>
            </div>
            <div class="clearfix"></div>

            <!-- Portfolio Entries -->
            <div class="showbiz" data-left="#showbiz_left_<?php 
            echo $randID;
            ?>
" data-right="#showbiz_right_<?php 
            echo $randID;
            ?>
">
              <div class="overflowholder">
                    <ul>
                        <?php 
            $args = array('post_type' => 'portfolio', 'posts_per_page' => $limit, 'orderby' => $orderby, 'order' => $order);
            if (!empty($filters)) {
                $args['tax_query'] = array(array('taxonomy' => 'filters', 'field' => 'id', 'terms' => $filters));
            }
            $wp_query = new WP_Query($args);
            if ($wp_query->found_posts > 1) {
                $mfpclass = "mfp-gallery";
            } else {
                $mfpclass = "mfp-image";
            }
            if ($wp_query->have_posts()) {
                while ($wp_query->have_posts()) {
                    $wp_query->the_post();
                    ?>

                         <!-- Item -->
                        <li>
                            <div class="portfolio-item media">
                                <figure>
                                    <div class="mediaholder">
                                        <?php 
                    $thumb = get_post_thumbnail_id();
                    $img_url = wp_get_attachment_url($thumb);
                    $lightbox = get_post_meta($wp_query->post->ID, 'pp_pf_lightbox', true);
                    if ($lightbox == 'lightbox') {
                        $fullsize = wp_get_attachment_image_src($thumb, 'full');
                        ?>
                                            <a href="<?php 
                        echo $fullsize[0];
                        ?>
" class="<?php 
                        echo $mfpclass;
                        ?>
" title="<?php 
                        the_title();
                        ?>
">
                                                <?php 
                        the_post_thumbnail('portfolio-4col');
                        ?>
                                                <div class="hovercover">
                                                    <div class="hovericon"><i class="hoverzoom"></i></div>
                                                </div>
                                            </a>
                                        <?php 
                    } else {
                        ?>
                                          <a href="<?php 
                        the_permalink();
                        ?>
" title="<?php 
                        the_title();
                        ?>
">
                                                <?php 
                        the_post_thumbnail('portfolio-4col');
                        ?>
                                                <div class="hovercover">
                                                    <div class="hovericon"><i class="hoverlink"></i></div>
                                                </div>
                                            </a>
                                        <?php 
                    }
                    ?>
                                    </div>

                                    <a href="<?php 
                    the_permalink();
                    ?>
">
                                        <figcaption class="item-description">
                                            <h5><?php 
                    the_title();
                    ?>
</h5>
                                            <?php 
                    $terms = get_the_terms($wp_query->post->ID, 'filters');
                    $output = '';
                    if ($terms && !is_wp_error($terms)) {
                        $output .= '<span>';
                        $filters = array();
                        $i = 0;
                        foreach ($terms as $term) {
                            $filters[] = $term->name;
                            if ($i++ > 0) {
                                break;
                            }
                        }
                        $outputfilters = join(", ", $filters);
                        $output .= $outputfilters;
                        $output .= '</span>';
                    }
                    echo $output;
                    ?>
                                        </figcaption>
                                    </a>
                                </figure>
                            </div>
                        </li>
                    <?php 
                }
                // close the Loop
            }
            ?>
                    </ul>
                    <div class="clearfix"></div>

                </div>
                <div class="clearfix"></div>

            </div>
        </div>
            <?php 
        }