echo '</div><!-- pt cat desc -->';
        if ($ports_num_columns == 1 && $extra_content == 'yes') {
            get_template_part('inc/details', 'portfolio');
        }
        echo '</div><!-- End portfolio-entry -->';
        // If we have only 1 column
        if ($ports_num_columns == 1) {
            echo '</div>';
            // End col-sm-6
            echo '</div>';
            // End row
        }
        echo '</div><!-- END portfolio-item -->';
        echo '</div><!-- END col-sm-x-->';
        if ($i >= 12) {
            echo '<div class="clearfix"></div>';
            $i = 0;
        }
    }
}
echo '</div>';
?>
<div class="pagination--<?php 
echo $portfolio_scheme;
?>
">
	<?php 
zn_pagination();
?>
</div>
Example #2
0
function _portfolio_carousel($options)
{
    $element_size = zn_get_size($options['_sizer']);
    global $post, $paged;
    $posts_per_page = isset($options['ports_per_page']) ? $options['ports_per_page'] : '4';
    // how many posts
    if (is_front_page()) {
        $paged = get_query_var('page') ? get_query_var('page') : 1;
    } else {
        $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    }
    $query = array('post_type' => 'portfolio', 'paged' => $paged, 'posts_per_page' => $posts_per_page, 'tax_query' => array(array('taxonomy' => 'project_category', 'field' => 'id', 'terms' => $options['portfolio_categories'])), 'showposts' => $options['ports_per_page_visible']);
    // Start the query
    query_posts($query);
    $i = 1;
    ?>
						<div class="span12">
							

							<?php 
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            // Get post meta information
            $post_meta_fields = get_post_meta($post->ID, 'zn_meta_elements', true);
            $post_meta_fields = maybe_unserialize($post_meta_fields);
            ?>
							<div class="row-fluid hg-portfolio-carousel">
								<div class="span6">
									<div class="ptcontent">
										<h3 class="title">
											<a href="<?php 
            the_permalink();
            ?>
"><span class="name"><?php 
            the_title();
            ?>
</span></a>
										</h3>
										<div class="pt-cat-desc">
											<?php 
            if (preg_match('/<!--more(.*?)?-->/', $post->post_content)) {
                the_content('');
            } else {
                the_excerpt();
            }
            ?>
										</div><!-- end item desc -->
										<div class="itemLinks">
											<?php 
            if (!empty($post_meta_fields['sp_link']['url'])) {
                echo '<span><a href="' . $post_meta_fields['sp_link']['url'] . '" target="' . $post_meta_fields['sp_link']['target'] . '" >' . __("Live Preview: ", THEMENAME) . '<strong>' . $post_meta_fields['sp_link']['url'] . '</strong></a></span>';
            }
            ?>
											<span class="seemore">
												<a href="<?php 
            the_permalink();
            ?>
" ><?php 
            _e('See more &rarr;', THEMENAME);
            ?>
</a>
											</span>
										</div><!-- end item links -->
									</div><!-- end item content -->
								</div>
								<div class="span6">
									<div class="ptcarousel">
									<?php 
            if (count($post_meta_fields['port_media']) > 1) {
                ?>
											<div class="controls">
												<a href="#" class="prev"><span class="icon-chevron-left icon-white"></span></a>
												<a href="#" class="next"><span class="icon-chevron-right icon-white"></span></a>
											</div>
										<?php 
            }
            ?>

										<ul class="ptcarousel1">
										<?php 
            if (!empty($post_meta_fields['port_media']) && is_array($post_meta_fields['port_media'])) {
                foreach ($post_meta_fields['port_media'] as $media) {
                    $size = zn_get_size('eight');
                    $has_image = false;
                    // Modified portfolio display
                    // Check to see if we have images
                    if ($portfolio_image = $media['port_media_image_comb']) {
                        if (is_array($portfolio_image)) {
                            if ($saved_image = $portfolio_image['image']) {
                                if (!empty($portfolio_image['alt'])) {
                                    $saved_alt = 'alt="' . $portfolio_image['alt'] . '"';
                                } else {
                                    $saved_alt = '';
                                }
                                if (!empty($portfolio_image['title'])) {
                                    $saved_title = 'title="' . $portfolio_image['title'] . '"';
                                } else {
                                    $saved_title = '';
                                }
                                $has_image = true;
                            }
                        } else {
                            $saved_image = $portfolio_image;
                            $has_image = true;
                            $saved_alt = '';
                            $saved_title = '';
                        }
                        if ($has_image) {
                            $image = vt_resize('', $saved_image, $size['width'], '', true);
                        }
                    }
                    // Check to see if we have video
                    if ($portfolio_media = $media['port_media_video_comb']) {
                    }
                    // Display the media
                    if (!empty($saved_image) && $portfolio_media) {
                        echo '<li>';
                        echo '<a href="' . $portfolio_media . '" data-type="video" rel="prettyPhoto" class="hoverLink">';
                        echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" ' . $saved_alt . ' ' . $saved_title . ' />';
                        echo '</a>';
                        echo '</li>';
                    } elseif (!empty($saved_image)) {
                        echo '<li>';
                        echo '<a href="' . $saved_image . '" data-type="image" rel="prettyPhoto" class="hoverLink">';
                        echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" ' . $saved_alt . ' ' . $saved_title . ' />';
                        echo '</a>';
                        echo '</li>';
                    } elseif ($portfolio_media) {
                        echo '<li>';
                        echo get_video_from_link($portfolio_media, '', $size['width'], $size['height']);
                        echo '</li>';
                    }
                }
            }
            ?>
										</ul>
									</div><!-- end ptcarousel -->
								</div>


								<?php 
            if ($i % $options['ports_per_page_visible'] != 0) {
                echo '<div class="span12"><hr class="bs-docs-separator"></div>';
            }
            $i++;
            ?>
								</div><!-- end portfolio layout -->

							<?php 
        }
        ?>
							<?php 
    }
    ?>
								
							
							
							<?php 
    echo '<div class="clear"></div>';
    echo '<div class="span12" >';
    zn_pagination();
    wp_reset_query();
    echo '</div>';
    ?>
						</div>
		<?php 
    $zn_pcarousel = array('zn_pcarousel' => "\n\t\t\t\t(function(\$) {\n\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t// ** Portfolio Carousel\n\t\t\t\t\t\tvar carousels =\tjQuery('.ptcarousel1');\n\t\t\t\t\t\tcarousels.each(function(index, element) {\n\n\t\t\t\t\t\t\tif ( \$(this).children().length > 1 ){\n\t\t\t\t\t\t\t\t\$(this).carouFredSel({\n\t\t\t\t\t\t\t\t\tresponsive: true,\n\t\t\t\t\t\t\t\t\titems: { width: 570 },\n\t\t\t\t\t\t\t\t\tprev\t: {\tbutton : \$(this).parent().find('a.prev'), key : \"left\" },\n\t\t\t\t\t\t\t\t\tnext\t: { button : \$(this).parent().find('a.next'), key : \"right\" },\n\t\t\t\t\t\t\t\t\tauto: {timeoutDuration: 5000},\n\t\t\t\t\t\t\t\t\tscroll: { fx: \"crossfade\", duration: \"1500\" }\n\t\t\t\t\t\t\t\t});\t\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// *** end Portfolio Carousel\n\t\t\t\t\t});\n\t\t\t\t})(jQuery);\n\t\t\t");
    zn_update_array($zn_pcarousel);
}
Example #3
0
    comments_number(__('No Comments', 'zn_framework'), __('1 Comment', 'zn_framework'), __('% Comments', 'zn_framework'));
    ?>
 to &#8220;<?php 
    the_title();
    ?>
&#8221;</h3>
    <ol class="commentlist kl-comments-list">
        <?php 
    wp_list_comments(array('callback' => 'zn_comment', 'style' => 'ol'));
    ?>
    </ol>

    <?php 
    $page = get_query_var('cpage');
    $args = array('range' => 3, 'showitems' => 7, 'paged' => empty($page) ? 1 : $page, 'method' => 'get_comments_pagenum_link', 'pages' => get_comment_pages_count(), 'previous_text' => __('Older comments', 'zn_framework'), 'older_text' => __('Newer comments', 'zn_framework'));
    zn_pagination($args);
    ?>

    <div class="clear"></div>

<?php 
}
?>


<?php 
if (comments_open()) {
    ?>
        <?php 
    if (get_option('comment_registration') && !$user_ID) {
        ?>
Example #4
0
function zn_woo_pagination()
{
    $args = array('class' => 'zn_no_arrows', 'previous_text' => '', 'older_text' => '');
    zn_pagination($args);
}
function zn_woocommerce_pagination()
{
    //		$pagination_args = array(
    //			'previous_text' => __( 'Previous page', 'zn_framework' ),
    //			'older_text' => __( 'Next page', 'zn_framework' ),
    //		);
    echo '<div class="pagination--' . zget_option('zn_main_style', 'color_options', false, 'light') . '">';
    zn_pagination();
    echo '</div>';
}
Example #6
0
<?php

/**
 * Pagination
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */
global $wp_query;
?>

<?php 
if ($wp_query->max_num_pages > 1) {
    ?>

<?php 
    zn_pagination($pages = '', $range = 2);
    ?>

<?php 
}
Example #7
0
function zn_woocommerce_pagination()
{
    zn_pagination();
}
Example #8
0
function _portfolio_category($options)
{
    $element_size = zn_get_size($options['_sizer']);
    wp_reset_query();
    global $post;
    $posts_per_page = isset($options['ports_per_page']) ? $options['ports_per_page'] : '4';
    // how many posts
    $query = array('post_type' => 'portfolio', 'paged' => get_query_var('paged') ? get_query_var('paged') : 1, 'posts_per_page' => $posts_per_page, 'tax_query' => array(array('taxonomy' => 'project_category', 'field' => 'id', 'terms' => $options['portfolio_categories'])), 'showposts' => $options['ports_per_page_visible']);
    // Start the query
    query_posts($query);
    if ($options['ports_num_columns'] == '1') {
        echo '<div class="span12">';
        // Start the loop
        while (have_posts()) {
            the_post();
            // Get post meta information
            $post_meta_fields = get_post_meta($post->ID, 'zn_meta_elements', true);
            $post_meta_fields = maybe_unserialize($post_meta_fields);
            echo '<div class="row-fluid">';
            echo '<div class="span6">';
            echo '<div class="img-intro">';
            if (!empty($post_meta_fields['port_media']) && is_array($post_meta_fields['port_media'])) {
                $size = zn_get_size('eight');
                $has_image = false;
                // Modified portfolio display
                // Check to see if we have images
                if ($portfolio_image = $post_meta_fields['port_media']['0']['port_media_image_comb']) {
                    if (is_array($portfolio_image)) {
                        if ($saved_image = $portfolio_image['image']) {
                            if (!empty($portfolio_image['alt'])) {
                                $saved_alt = 'alt="' . $portfolio_image['alt'] . '"';
                            } else {
                                $saved_alt = '';
                            }
                            if (!empty($portfolio_image['title'])) {
                                $saved_title = 'title="' . $portfolio_image['title'] . '"';
                            } else {
                                $saved_title = '';
                            }
                            $has_image = true;
                        }
                    } else {
                        $saved_image = $portfolio_image;
                        $has_image = true;
                        $saved_alt = '';
                        $saved_title = '';
                    }
                    if ($has_image) {
                        $image = vt_resize('', $saved_image, $size['width'], '', true);
                    }
                }
                // Check to see if we have video
                if ($portfolio_media = $post_meta_fields['port_media']['0']['port_media_video_comb']) {
                }
                // Display the media
                if (!empty($saved_image) && $portfolio_media) {
                    echo '<a href="' . $portfolio_media . '" data-type="video" rel="prettyPhoto" class="hoverLink">';
                    echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" ' . $saved_alt . ' ' . $saved_title . ' />';
                    echo '</a>';
                } elseif (!empty($saved_image)) {
                    echo '<a href="' . $saved_image . '" data-type="image" rel="prettyPhoto" class="hoverLink">';
                    echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" ' . $saved_alt . ' ' . $saved_title . ' />';
                    echo '</a>';
                } elseif ($portfolio_media) {
                    echo get_video_from_link($portfolio_media, '', $size['width'], $size['height']);
                }
            }
            echo '</div><!-- img intro -->';
            echo '</div>';
            echo '<div class="span6">';
            echo '<h3 class="title">';
            echo '<a href="' . get_permalink() . '" >' . get_the_title() . '</a>';
            echo '</h3>';
            echo '<div class="pt-cat-desc">';
            the_content();
            echo '</div><!-- pt cat desc -->';
            echo '</div>';
            echo '</div><!-- end row -->';
        }
        echo '<div class="row-fluid zn_content_no_margin">';
        echo '<div class="span12">';
        zn_pagination();
        wp_reset_query();
        echo '</div>';
        echo '</div>';
        echo '</div>';
    } else {
        $proper_size = 12 / $options['ports_num_columns'];
        $i = 1;
        echo '<div class="span12">';
        // Start the loop
        while (have_posts()) {
            the_post();
            if ($i % $options['ports_num_columns'] == 1) {
                echo '<div class="row-fluid">';
            }
            // Get post meta information
            $post_meta_fields = get_post_meta($post->ID, 'zn_meta_elements', true);
            $post_meta_fields = maybe_unserialize($post_meta_fields);
            echo '<div class="span' . $proper_size . '">';
            echo '<div class="img-intro">';
            if (!empty($post_meta_fields['port_media']) && is_array($post_meta_fields['port_media'])) {
                $size = zn_get_size('span' . $proper_size);
                $has_image = false;
                // Modified portfolio display
                // Check to see if we have images
                if ($portfolio_image = $post_meta_fields['port_media']['0']['port_media_image_comb']) {
                    if (is_array($portfolio_image)) {
                        if ($saved_image = $portfolio_image['image']) {
                            if (!empty($portfolio_image['alt'])) {
                                $saved_alt = 'alt="' . $portfolio_image['alt'] . '"';
                            } else {
                                $saved_alt = '';
                            }
                            if (!empty($portfolio_image['title'])) {
                                $saved_title = 'title="' . $portfolio_image['title'] . '"';
                            } else {
                                $saved_title = '';
                            }
                            $has_image = true;
                        }
                    } else {
                        $saved_image = $portfolio_image;
                        $has_image = true;
                        $saved_alt = '';
                        $saved_title = '';
                    }
                    if ($has_image) {
                        $image = vt_resize('', $saved_image, $size['width'], '', true);
                    }
                }
                // Check to see if we have video
                if ($portfolio_media = $post_meta_fields['port_media']['0']['port_media_video_comb']) {
                }
                // Display the media
                if (!empty($saved_image) && $portfolio_media) {
                    echo '<a href="' . $portfolio_media . '" data-type="video" rel="prettyPhoto" class="hoverLink">';
                    echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" ' . $saved_alt . ' ' . $saved_title . ' />';
                    echo '</a>';
                } elseif (!empty($saved_image)) {
                    echo '<a href="' . $saved_image . '" data-type="image" rel="prettyPhoto" class="hoverLink">';
                    echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" ' . $saved_alt . ' ' . $saved_title . ' />';
                    echo '</a>';
                } elseif ($portfolio_media) {
                    echo get_video_from_link($portfolio_media, '', $size['width'], $size['height']);
                }
            }
            echo '</div><!-- img intro -->';
            echo '<h3 class="title">';
            echo '<a href="' . get_permalink() . '" >' . get_the_title() . '</a>';
            echo '</h3>';
            echo '<div class="pt-cat-desc">';
            if (preg_match('/<!--more(.*?)?-->/', $post->post_content)) {
                the_content('');
            } else {
                the_excerpt();
            }
            echo '</div><!-- pt cat desc -->';
            echo '</div>';
            if ($i % $options['ports_num_columns'] == 0 && $i % $options['ports_per_page_visible'] != 0) {
                echo '<div class="row-fluid"><div class="span12"><hr class="bs-docs-separator"></div></div></div>';
            }
            $i++;
        }
        echo '<div class="clear"></div>';
        echo '<div class="row-fluid"></div>';
        echo '<div class="span12" >';
        zn_pagination();
        wp_reset_query();
        echo '</div>';
        echo '</div><!-- end row -->';
        echo '</div>';
    }
}