<header>
			<h2 class="loop-entry-title"><a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    echo esc_attr(the_title_attribute('echo=0'));
    ?>
"><?php 
    the_title();
    ?>
</a></h2>
			<?php 
    // Display post meta details
    wpex_post_meta();
    ?>
			</header>
			<div class="loop-entry-content entry clr">
				<?php 
    if (get_theme_mod('wpex_entry_content_excerpt', 'excerpt') == 'content') {
        the_content();
    } else {
        $wpex_readmore = get_theme_mod('wpex_blog_readmore') == '1' ? true : false;
        wpex_excerpt(30, $wpex_readmore);
    }
    ?>
			</div><!-- .loop-entry-content -->
		</div><!-- .loop-entry-text -->
	</article><!-- .loop-entry -->

<?php 
}
if ($check_more_tag && strpos(get_the_content(), 'more-link')) {
    ?>

				<?php 
    // Display entry content up to the more tag
    the_content('', '&hellip;');
    ?>

			<?php 
    // Generate custom excerpt
} else {
    ?>

				<?php 
    // Output excerpt with length of 40
    wpex_excerpt(array('length' => '40'));
    ?>

			<?php 
}
?>

		</div><!-- .custom-posttype-entry-excerpt -->

		<div class="custom-posttype-entry-readmore clr">

			<a href="<?php 
wpex_permalink();
?>
" class="theme-button" title="<?php 
wpex_esc_title();
Exemple #3
0
    function vcex_testimonials_grid_shortcode($atts)
    {
        extract(shortcode_atts(array('unique_id' => '', 'term_slug' => 'all', 'include_categories' => '', 'exclude_categories' => '', 'posts_per_page' => '12', 'grid_style' => 'fit_columns', 'masonry_layout_mode' => '', 'filter_speed' => '', 'columns' => '4', 'order' => 'DESC', 'orderby' => 'date', 'orderby_meta_key' => '', 'filter' => 'true', 'center_filter' => '', 'title' => 'true', 'excerpt' => 'false', 'excerpt_length' => '20', 'read_more' => 'true', 'read_more_text' => __('read more', 'wpex'), 'pagination' => 'false', 'filter_content' => 'false', 'offset' => 0, 'taxonomy' => '', 'terms' => '', 'all_text' => __('All', 'wpex'), 'img_border_radius' => '50%', 'img_width' => '45', 'img_height' => '45', 'custom_excerpt_trim' => ''), $atts));
        // Turn output buffer on
        ob_start();
        // Get global $post var
        global $post;
        // Trim custom Excerpts?
        if ('false' == $custom_excerpt_trim) {
            $custom_excerpt_trim = false;
        } else {
            $custom_excerpt_trim = true;
        }
        // Border Radius
        $img_border_radius = $img_border_radius ? $img_border_radius : '50%';
        $img_border_radius = 'style="border-radius:' . $img_border_radius . ';"';
        // Include categories
        $include_categories = '' != $include_categories ? $include_categories : $term_slug;
        $include_categories = 'all' == $include_categories ? '' : $include_categories;
        $filter_cats_include = '';
        if ($include_categories) {
            $include_categories = explode(',', $include_categories);
            $filter_cats_include = array();
            foreach ($include_categories as $key) {
                $key = get_term_by('slug', $key, 'testimonials_category');
                $filter_cats_include[] = $key->term_id;
            }
        }
        // Exclude categories
        $filter_cats_exclude = '';
        if ($exclude_categories) {
            $exclude_categories = explode(',', $exclude_categories);
            if (!empty($exclude_categories) && is_array($exclude_categories)) {
                $filter_cats_exclude = array();
                foreach ($exclude_categories as $key) {
                    $key = get_term_by('slug', $key, 'testimonials_category');
                    $filter_cats_exclude[] = $key->term_id;
                }
                $exclude_categories = array('taxonomy' => 'testimonials_category', 'field' => 'slug', 'terms' => $exclude_categories, 'operator' => 'NOT IN');
            } else {
                $exclude_categories = '';
            }
        }
        // Start Tax Query
        if (!empty($include_categories) && is_array($include_categories)) {
            $include_categories = array('taxonomy' => 'testimonials_category', 'field' => 'slug', 'terms' => $include_categories, 'operator' => 'IN');
        } else {
            $include_categories = '';
        }
        // Meta key for orderby
        if ($orderby_meta_key && ('meta_value_num' == $orderby || 'meta_value' == $orderby)) {
            $meta_key = $orderby_meta_key;
        } else {
            $meta_key = NULL;
        }
        // Pagination var
        $paged = NULL;
        $no_found_rows = true;
        if ('true' == $pagination) {
            global $paged;
            $paged = get_query_var('paged') ? get_query_var('paged') : 1;
            $no_found_rows = false;
        }
        // The Query
        $wpex_query = new WP_Query(array('post_type' => 'testimonials', 'posts_per_page' => $posts_per_page, 'offset' => $offset, 'order' => $order, 'orderby' => $orderby, 'meta_key' => $meta_key, 'filter_content' => $filter_content, 'paged' => $paged, 'tax_query' => array('relation' => 'AND', $include_categories, $exclude_categories), 'no_found_rows' => $no_found_rows));
        //Output posts
        if ($wpex_query->posts) {
            // Main Vars
            $unique_id = $unique_id ? $unique_id : 'testimonials-' . rand(1, 100);
            // Is Isotope var
            if ('true' == $filter || 'masonry' == $grid_style) {
                $is_isotope = true;
            } else {
                $is_isotope = false;
            }
            // No need for masonry if not enough columns and filter is disabled
            if ('true' != $filter && 'masonry' == $grid_style) {
                $post_count = count($wpex_query->posts);
                if ($post_count <= $columns) {
                    $is_isotope = false;
                }
            }
            // Output script for inline JS for the Visual composer front-end builder
            if (function_exists('vcex_front_end_grid_js')) {
                if ($is_isotope) {
                    vcex_front_end_grid_js('isotope');
                }
            }
            // Display filter links
            if ($filter == 'true' && taxonomy_exists('testimonials_category')) {
                $terms = get_terms('testimonials_category', array('include' => $filter_cats_include, 'exclude' => $filter_cats_exclude));
                $terms = apply_filters('vcex_testimonials_grid_get_terms', $terms);
                if ($terms && count($terms) > '1') {
                    $center_filter = 'yes' == $center_filter ? 'center' : '';
                    ?>
						<ul class="vcex-testimonials-filter filter-<?php 
                    echo $unique_id;
                    ?>
 vcex-filter-links <?php 
                    echo $center_filter;
                    ?>
 clr">
							<li class="active"><a href="#" data-filter="*"><span><?php 
                    echo $all_text;
                    ?>
</span></a></li>
							<?php 
                    foreach ($terms as $term) {
                        ?>
								<li><a href="#" data-filter=".cat-<?php 
                        echo $term->term_id;
                        ?>
"><?php 
                        echo $term->name;
                        ?>
</a></li>
							<?php 
                    }
                    ?>
						</ul><!-- .vcex-testimonials-filter -->
					<?php 
                }
            }
            // Wrap Classes
            $wrap_classes = 'wpex-row vcex-testimonials-grid clr';
            if ($is_isotope) {
                $wrap_classes .= ' vcex-isotope-grid';
            }
            // Data
            $data = '';
            if ($is_isotope && 'true' == $filter) {
                if ('no_margins' != $grid_style && $masonry_layout_mode) {
                    $data .= ' data-layout-mode="' . $masonry_layout_mode . '"';
                }
                if ($filter_speed) {
                    $data .= ' data-transition-duration="' . $filter_speed . '"';
                }
            }
            ?>

				<div class="<?php 
            echo $wrap_classes;
            ?>
" id="<?php 
            echo $unique_id;
            ?>
"<?php 
            echo $data;
            ?>
>
					<?php 
            $count = '';
            foreach ($wpex_query->posts as $post) {
                setup_postdata($post);
                $count++;
                // Get post data
                $post_id = get_the_ID();
                $wpex_testimonial_author = get_post_meta(get_the_ID(), 'wpex_testimonial_author', true);
                $wpex_testimonial_company = get_post_meta(get_the_ID(), 'wpex_testimonial_company', true);
                $wpex_testimonial_url = get_post_meta(get_the_ID(), 'wpex_testimonial_url', true);
                // Get featured image and resize it
                $post_thumb_id = get_post_thumbnail_id();
                $attachment_url = wp_get_attachment_url($post_thumb_id);
                $img_crop = '9999' == $img_height ? false : true;
                $cropped_img = wpex_image_resize(wp_get_attachment_url(get_post_thumbnail_id()), intval($img_width), intval($img_height), $img_crop, 'array');
                $img_url = $cropped_img['url'];
                // Add classes to the entries
                $entry_classes = 'testimonial-entry col';
                $entry_classes .= ' span_1_of_' . $columns;
                $entry_classes .= ' col-' . $count;
                if ($is_isotope) {
                    $entry_classes .= ' vcex-isotope-entry';
                }
                if (taxonomy_exists('testimonials_category')) {
                    $post_terms = get_the_terms($post, 'testimonials_category');
                    if ($post_terms) {
                        foreach ($post_terms as $post_term) {
                            $entry_classes .= ' cat-' . $post_term->term_id;
                        }
                    }
                }
                ?>
						<div id="#post-<?php 
                the_ID();
                ?>
" class="<?php 
                echo $entry_classes;
                ?>
">
							<div class="testimonial-entry-content clr">
								<span class="testimonial-caret"></span>
								<?php 
                // Custom Excerpt
                if ('true' == $excerpt) {
                    $read_more = $read_more == 'true' ? true : false;
                    if ('true' == $read_more) {
                        if (is_rtl()) {
                            $read_more_link = '...<a href="' . get_permalink() . '" title="' . $read_more_text . '">' . $read_more_text . '</a>';
                        } else {
                            $read_more_link = '...<a href="' . get_permalink() . '" title="' . $read_more_text . '">' . $read_more_text . '<span>&rarr;</span></a>';
                        }
                    } else {
                        $read_more_link = '...';
                    }
                    // Custom Excerpt function
                    if (function_exists('wpex_excerpt')) {
                        $args = array('post_id' => $post_id, 'length' => intval($excerpt_length), 'trim_custom_excerpts' => $custom_excerpt_trim, 'readmore' => false, 'more' => $read_more_link);
                        wpex_excerpt($args);
                    } else {
                        the_excerpt();
                    }
                } else {
                    the_content();
                }
                ?>
							</div><!-- .home-testimonial-entry-content-->
							<div class="testimonial-entry-bottom">
								<?php 
                if (has_post_thumbnail()) {
                    ?>
								<div class="testimonial-entry-thumb">
									<img src="<?php 
                    echo $img_url;
                    ?>
" alt="<?php 
                    echo the_title();
                    ?>
" <?php 
                    echo $img_border_radius;
                    ?>
 />
								</div><!-- /testimonial-thumb -->
								<?php 
                }
                ?>
								<div class="testimonial-entry-meta">
									<?php 
                if ($wpex_testimonial_author) {
                    ?>
										<span class="testimonial-entry-author"><?php 
                    echo $wpex_testimonial_author;
                    ?>
</span>
									<?php 
                }
                ?>
									<?php 
                if ($wpex_testimonial_company) {
                    ?>
										<?php 
                    if ($wpex_testimonial_url) {
                        ?>
											<a href="<?php 
                        echo esc_url($wpex_testimonial_url);
                        ?>
" class="testimonial-entry-company" title="<?php 
                        echo $wpex_testimonial_company;
                        ?>
" target="_blank"><?php 
                        echo $wpex_testimonial_company;
                        ?>
</a>
										<?php 
                    } else {
                        ?>
											<span class="testimonial-entry-company"><?php 
                        echo $wpex_testimonial_company;
                        ?>
</span>
										<?php 
                    }
                    ?>
									<?php 
                }
                ?>
								</div><!-- .testimonial-entry-meta -->
							</div><!-- .home-testimonial-entry-bottom -->
						</div><!-- .testimonials-entry -->
						<?php 
                // Reset counter
                if ($count == $columns) {
                    $count = '';
                }
            }
            ?>
				</div><!-- .vcex-testimonials-grid -->
				
				<?php 
            // Paginate Posts
            if ('true' == $pagination) {
                wpex_pagination($wpex_query);
            }
            // End has posts check
        }
        // Reset the WP query
        wp_reset_postdata();
        // Return outbut buffer
        return ob_get_clean();
    }
</a></h2>
				<?php 
    // Displays the post entry author avatar - see functions/post-entry-author-avatar.php
    wpex_post_entry_author_avatar();
    // Display post meta - see functions/post-meta.php
    wpex_post_meta();
    ?>
			</header>
			<div class="blog-entry-excerpt entry">
				<?php 
    // Display excerpt
    if (wpex_option('blog_exceprt', '1') == '1') {
        // Get excerpt length & output excerpt
        // See functions/excerpts.php
        $wpex_excerpt_length = wpex_excerpt_length();
        wpex_excerpt($wpex_excerpt_length);
    } else {
        the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'wpex'));
    }
    ?>
			</div><!-- .entry-excerpt -->
           <?php 
    // Read more link - see functions/post-readmore-link.php
    wpex_post_readmore_link();
    // Social sharing links
    wpex_social_share();
    ?>
		</div><!-- .blog-entry-content -->
    </article><!-- .blog-entry-entry -->

<?php 
Exemple #5
0
							<li class="meta-date">
								<?php 
        _e('Posted on', 'wpex');
        ?>
								<span class="meta-date-text"><?php 
        echo get_the_date();
        ?>
</span>
							</li>
							
						</ul><!-- .post-meta -->
					</header>

					<div class="recent-blog-entry-content entry clr">
						<?php 
        wpex_excerpt(18, false);
        ?>
					</div><!-- .recent-blog-entry-content -->

				</article><!-- .recent-blog -->

			<?php 
        if ($wpex_count == '3') {
            $wpex_count = 0;
        }
        ?>

		<?php 
    }
    ?>
<?php

/**
 * Search entry excerpt
 *
 * @package Total WordPress theme
 * @subpackage Partials
 * @version 3.0.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
?>

<div class="search-entry-excerpt clr">
    <?php 
wpex_excerpt(array('length' => '30', 'readmore' => false, 'ignore_more_tag' => true));
?>
</div><!-- .search-entry-excerpt -->
                if ('false' != $read_more_rarr) {
                    $read_more_rarr_html = '<span>&rarr;</span>';
                } else {
                    $read_more_rarr_html = '';
                }
                // Read more text
                if (is_rtl()) {
                    $read_more_link = '...<a href="' . wpex_get_permalink() . '" title="' . esc_attr($read_more_text) . '">' . $read_more_text . '</a>';
                } else {
                    $read_more_link = '...<a href="' . wpex_get_permalink() . '" title="' . esc_attr($read_more_text) . '">' . $read_more_text . $read_more_rarr_html . '</a>';
                }
            } else {
                $read_more_link = '...';
            }
            // Custom Excerpt function
            wpex_excerpt(array('post_id' => $testimonial->ID, 'length' => intval($excerpt_length), 'more' => $read_more_link));
            // Display full post content
        } else {
            the_content();
        }
        ?>

						</div><!-- .entry -->

					</div><!-- .home-testimonial-entry-content-->

					<div class="testimonial-entry-bottom">

						<?php 
        // Check if post thumbnail is defined
        if (has_post_thumbnail() && 'true' == $entry_media) {
    echo wpex_get_featured_image_url();
    ?>
" alt="<?php 
    echo esc_attr(the_title_attribute('echo=0'));
    ?>
" />
			</a>
		</div><!-- .search-entry-thumb -->
    <?php 
}
?>
  
    <div class="search-entry-text">
        <header>
            <h2><a href="<?php 
the_permalink();
?>
" title="<?php 
echo esc_attr(the_title_attribute('echo=0'));
?>
"><?php 
the_title();
?>
</a></h2>
       </header>
        <?php 
// Custom excerpt function - see functions/excerpts.php
wpex_excerpt('30', true);
?>
    </div><!-- .search-entry-text -->
</article><!-- .entry -->
Exemple #9
0
	<?php 
}
?>

	<div class="search-entry-text clr">

		<header>
			<h2 class="search-entry-title"><a href="<?php 
the_permalink();
?>
" title="<?php 
echo esc_attr(the_title_attribute('echo=0'));
?>
"><?php 
the_title();
?>
</a></h2>
		</header>

		<div class="search-entry-content entry clr">

			<?php 
wpex_excerpt(50);
?>
			
		</div><!-- .search-entry-content -->

	</div><!-- .search-entry-text -->

</article><!-- .search-entry -->
Exemple #10
0
<?php

/**
 * Displays post entry content
 *
 * @package     Elegant WordPress theme
 * @subpackage  Partials
 * @author      Alexander Clarke
 * @link        http://www.wpexplorer.com
 * @since       1.0.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
?>

<div class="loop-entry-content entry clr">

	<?php 
// Display full content
if (get_theme_mod('wpex_entry_content_excerpt', 'excerpt') == 'content') {
    the_content();
} else {
    wpex_excerpt(93, get_theme_mod('wpex_blog_readmore', true));
}
?>

</div><!-- .loop-entry-content -->
Exemple #11
0
    function wpex_social_share($post_id = NULL)
    {
        // Get sharing sites
        $defaults = array('twitter', 'facebook', 'google_plus', 'pinterest', 'linkedin');
        $sharing_sites = get_theme_mod('social_share_sites', $defaults);
        // Return nothing if there aren't any sites enabled
        if (empty($sharing_sites)) {
            return;
        }
        // Get post id
        $post_id = $post_id ? $post_id : wpex_get_the_id();
        // Don't show social sharing on password protected posts
        if (post_password_required($post_id)) {
            return;
        }
        // Check if disabled in page settings
        if ('on' == get_post_meta($post_id, 'wpex_disable_social', true)) {
            return;
        }
        // Get sharing options
        $position = get_theme_mod('social_share_position', 'horizontal');
        $style = get_theme_mod('social_share_style', 'minimal');
        // Output var
        $output = '';
        // Get and encode permalink
        $permalink = get_permalink($post_id);
        $url = urlencode($permalink);
        // Get and encode title
        $args = array('before' => false, 'after' => false, 'echo' => false, 'post' => $post_id);
        $title = urlencode(esc_attr(the_title_attribute($args)));
        // Get and encode summar
        $args = array('length' => '40', 'echo' => false);
        $summary = urlencode(wpex_excerpt($args));
        // Get image
        $img = wp_get_attachment_url(get_post_thumbnail_id($post_id));
        // Source URL
        $source = home_url();
        // Sharing block heading
        $heading = wpex_option('social_share_heading', __('Please Share This', 'wpex'));
        $heading = apply_filters('wpex_social_share_heading', $heading);
        // Get post layout
        $post_layout = wpex_get_post_layout_class($post_id);
        // Only display horizontal style menu for mobile devices
        if (wp_is_mobile()) {
            $position = 'horizontal';
        }
        // Tooltip Style
        if (is_rtl()) {
            $tooltip_class = 'tooltip-right';
        } elseif ($position == 'horizontal') {
            $tooltip_class = 'tooltip-up';
        } else {
            if ($post_layout == 'left-sidebar') {
                $tooltip_class = 'tooltip-left';
            } else {
                $tooltip_class = 'tooltip-right';
            }
        }
        // Display heading on Boxed layout
        if ($position == 'horizontal') {
            ?>
			<div class="social-share-title theme-heading"><span><?php 
            echo $heading;
            ?>
</span></div>
		<?php 
        }
        ?>

		<ul class="social-share-buttons position-<?php 
        echo $position;
        ?>
 style-<?php 
        echo $style;
        ?>
 clr">
			<?php 
        // Loop through each social sharing site that is enabled
        foreach ($sharing_sites as $site) {
            // Twitter
            if ('twitter' == $site) {
                ?>
					<li class="share-twitter">
						<a href="http://twitter.com/share?text=<?php 
                echo $title;
                ?>
&amp;url=<?php 
                echo $url;
                ?>
" target="_blank" title="<?php 
                _e('Share on Twitter', 'wpex');
                ?>
" rel="nofollow" class="<?php 
                echo $tooltip_class;
                ?>
" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
							<span class="fa fa-twitter"></span>
							<?php 
                if ($position == 'horizontal') {
                    ?>
								<span class="social-share-button-text"><?php 
                    _e('Tweet', 'wpex');
                    ?>
</span>
							<?php 
                }
                ?>
						</a>
					</li>
				<?php 
            } elseif ('facebook' == $site) {
                ?>
					<li class="share-facebook">
						<a href="http://www.facebook.com/share.php?u=<?php 
                echo $url;
                ?>
" target="_blank" title="<?php 
                _e('Share on Facebook', 'wpex');
                ?>
" rel="nofollow" class="<?php 
                echo $tooltip_class;
                ?>
" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
							<span class="fa fa-facebook"></span>
							<?php 
                if ($position == 'horizontal') {
                    ?>
								<span class="social-share-button-text"><?php 
                    _e('Like', 'wpex');
                    ?>
</span>
							<?php 
                }
                ?>
						</a>
					</li>
				<?php 
            } elseif ('google_plus' == $site) {
                ?>
					<li class="share-googleplus">
						<a title="<?php 
                _e('Share on Google+', 'wpex');
                ?>
" rel="external" href="https://plus.google.com/share?url=<?php 
                echo $url;
                ?>
" class="<?php 
                echo $tooltip_class;
                ?>
" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
							<span class="fa fa-google-plus"></span>
							<?php 
                if ($position == 'horizontal') {
                    ?>
								<span class="social-share-button-text"><?php 
                    _e('Plus one', 'wpex');
                    ?>
</span>
							<?php 
                }
                ?>
						</a>
					</li>
				<?php 
            } elseif ('pinterest' == $site) {
                ?>
					<li class="share-pinterest">
						<a href="http://pinterest.com/pin/create/button/?url=<?php 
                echo $url;
                ?>
&amp;media=<?php 
                echo $img;
                ?>
&amp;description=<?php 
                echo $summary;
                ?>
" target="_blank" title="<?php 
                _e('Share on Pinterest', 'wpex');
                ?>
" rel="nofollow" class="<?php 
                echo $tooltip_class;
                ?>
" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
							<span class="fa fa-pinterest"></span>
							<?php 
                if ($position == 'horizontal') {
                    ?>
								<span class="social-share-button-text"><?php 
                    _e('Pin It', 'wpex');
                    ?>
</span>
							<?php 
                }
                ?>
						</a>
					</li>
				<?php 
            } elseif ('linkedin' == $site) {
                ?>
					<li class="share-linkedin">
						<a title="<?php 
                _e('Share on LinkedIn', 'wpex');
                ?>
" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=<?php 
                echo $url;
                ?>
&amp;title=<?php 
                echo $title;
                ?>
&amp;summary=<?php 
                echo $summary;
                ?>
&amp;source=<?php 
                echo $source;
                ?>
" target="_blank" rel="nofollow" class="<?php 
                echo $tooltip_class;
                ?>
" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
							<span class="fa fa-linkedin"></span>
							<?php 
                if ($position == 'horizontal') {
                    ?>
								<span class="social-share-button-text"><?php 
                    _e('Share', 'wpex');
                    ?>
</span>
							<?php 
                }
                ?>
						</a>
					</li>
				<?php 
            }
        }
        ?>
		</ul>
	<?php 
    }
    function wpex_related_posts()
    {
        // Return if disabled
        if (get_theme_mod('blog_related', '1') !== '1') {
            return;
        }
        // Get Post Data
        global $post;
        $post_id = $post->ID;
        // Return if not standard post type
        if (get_post_type($post) !== 'post') {
            return;
        }
        // Theme Settings
        $disable_related_items = get_post_meta($post_id, 'wpex_disable_related_items', true);
        $posts_per_page = get_theme_mod('blog_related_count', '3');
        // Create an array of current category ID's
        $cats = wp_get_post_terms($post_id, 'category');
        $cats_ids = array();
        foreach ($cats as $wpex_related_cat) {
            $cats_ids[] = $wpex_related_cat->term_id;
        }
        // Related query arguments
        $args = array('posts_per_page' => $posts_per_page, 'orderby' => 'rand', 'category__in' => $cats_ids, 'post__not_in' => array($post_id), 'no_found_rows' => true, 'tax_query' => array('relation' => 'AND', array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array('post-format-quote', 'post-format-link'), 'operator' => 'NOT IN')));
        $wpex_query = new wp_query($args);
        if ($wpex_query->have_posts()) {
            ?>
			 <section class="related-posts clr">
				<div class="related-posts-title heading"><span><?php 
            _e('Related Posts', 'wpex');
            ?>
</span></div>
				<?php 
            // Loop through related posts
            $count = 0;
            foreach ($wpex_query->posts as $post) {
                setup_postdata($post);
                $count++;
                $postid = $post->ID;
                $attachment_id = get_post_thumbnail_id($postid);
                ?>
					<article class="related-post-entry span_1_of_3 col clr col-<?php 
                echo $count;
                ?>
">
						<?php 
                // Display related post thumbnail
                if (has_post_thumbnail()) {
                    ?>
							<a href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    echo esc_attr(the_title_attribute('echo=0'));
                    ?>
" rel="bookmark" class="related-post-entry-thumbnail">
								<img src="<?php 
                    echo wpex_get_featured_img_url($attachment_id, false, false);
                    ?>
" alt="<?php 
                    echo the_title();
                    ?>
" />
								<?php 
                    if ('video' == get_post_format()) {
                        ?>
									<div class="related-post-entry-video-overlay"><i class="fa fa-play-circle-o"></i></div>
								<?php 
                    }
                    ?>
							</a>
						<?php 
                }
                ?>
						<div class="related-post-entry-content clr">
							<a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                echo esc_attr(the_title_attribute('echo=0'));
                ?>
" rel="bookmark" class="related-post-entry-title"><?php 
                the_title();
                ?>
</a>
							<div class="related-post-entry-excerpt clr">
								<?php 
                wpex_excerpt('15', false);
                ?>
							</div><!-- related-post-entry-excerpt -->
						</div><!-- .related-post-entry-content -->
					</article><!-- .related-post-entry -->
				<?php 
            }
            ?>
			 </section>
		<?php 
        }
        // End related items
        // Reset query
        wp_reset_postdata();
    }
									</a>
								</div><!-- .featured-slider-img -->
								<article class="featured-slider-caption">
									<h2 class="featured-slider-caption-title"><a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            echo esc_attr(the_title_attribute('echo=0'));
            ?>
" rel="bookmark"><?php 
            the_title();
            ?>
</a></h2>
									<div class="featured-slider-caption-excerpt clr">
										<?php 
            echo wpex_excerpt('20');
            ?>
									</div><!-- .featured-slider-caption-excerpt -->
								</article><!--.featured-slider-caption -->
							</li><!-- .featured-slider-->
						<?php 
        }
        ?>
					</ul><!--.slides -->
				</div><!-- .flexslider -->
				<span class="featured-slider-preloader"><i class="fa fa-spinner fa-spin"></i></span>
			</div><!-- #featured-flexslider -->
		</div><!-- #featured-slider-wrap -->
	<?php 
    }
    ?>
        the_permalink();
        ?>
" title="<?php 
        echo esc_attr(the_title_attribute('echo=0'));
        ?>
"><?php 
        the_title();
        ?>
</a>
			<?php 
    } else {
        ?>
				<?php 
        the_title();
        ?>
			<?php 
    }
    ?>
			</h2>
			<div class="staff-entry-excerpt clr">
				<?php 
    wpex_excerpt('40', false);
    ?>
			</div><!-- .staff-entry-excerpt -->
			<?php 
    echo wpex_get_staff_social();
    ?>
		</div><!-- .staff-entry-details -->
   </article><!-- .staff-entry -->
<?php 
}
Exemple #15
0
 * @version 3.0.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
// Should we check for the more tag?
$check_more_tag = apply_filters('wpex_check_more_tag', true);
?>

<div class="blog-entry-excerpt wpex-clr">

    <?php 
// Display excerpt if auto excerpts are enabled in the admin
if (wpex_get_mod('blog_exceprt', true)) {
    // Check if the post tag is using the "more" tag
    if ($check_more_tag && strpos(get_the_content(), 'more-link')) {
        // Display the content up to the more tag
        the_content('', '&hellip;');
        // Otherwise display custom excerpt
    } else {
        // Display custom excerpt
        wpex_excerpt(array('length' => wpex_excerpt_length()));
    }
    // If excerpts are disabled, display full content
} else {
    the_content('', '&hellip;');
}
?>

</div><!-- .blog-entry-excerpt -->
			</a>
		</div><!-- .portfolio-entry-media -->
	<?php 
}
// End if
?>
	<?php 
// Display portfolio details if enabled
if (wpex_option('portfolio_entry_details', '1') == '1') {
    ?>
		<div class="portfolio-entry-details clr">
			<h2 class="portfolio-entry-title"><a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    echo esc_attr(the_title_attribute('echo=0'));
    ?>
"><?php 
    the_title();
    ?>
</a></h2>
			<div class="portfolio-entry-excerpt clr"><?php 
    wpex_excerpt(wpex_option('portfolio_entry_excerpt_length', '20'), false);
    ?>
</div>
		</div><!-- .portfolio-entry-details -->
	<?php 
}
// End if
?>
</article><!-- .portfolio-entry -->
	<?php 
}
?>
	<h2 class="portfolio-entry-title">
		<a href="<?php 
the_permalink();
?>
" title="<?php 
echo esc_attr(the_title_attribute('echo=0'));
?>
"><?php 
the_title();
?>
</a>
	</h2>
	<div class="portfolio-entry-excerpt clr">
		<?php 
// Display excerpt
$args = array('length' => get_theme_mod('portfolio_entry_excerpt_length', '20'), 'readmore' => false);
wpex_excerpt($args);
?>
	</div>
	<?php 
// Close Match Height div
if (wpex_portfolio_match_height()) {
    ?>
	</div>
	<?php 
}
?>
</div><!-- .portfolio-entry-details -->
            // Custom Excerpt
            if ('true' == $excerpt) {
                if ('true' == $read_more) {
                    $read_more_text = $read_more_text ? $read_more_text : esc_html__('read more', 'total');
                    $read_more_link = '&hellip;<a href="' . get_permalink() . '" title="' . $read_more_text . '">' . $read_more_text . '<span>&rarr;</span></a>';
                } else {
                    $read_more_link = '&hellip;';
                }
                ?>

									<div class="entry remove-last-p-margin wpex-fw-300 clr"<?php 
                echo $slide_style;
                ?>
>
										<?php 
                wpex_excerpt(array('length' => intval($excerpt_length), 'more' => $read_more_link));
                ?>
									</div>

								<?php 
                // Full content
            } else {
                ?>

									<div class="entry remove-last-p-margin wpex-fw-300 clr"<?php 
                echo $slide_style;
                ?>
><?php 
                the_content();
                ?>
</div>
<?php

/**
 * Outputs the portfolio entry excerpt
 *
 * @package Total WordPress theme
 * @subpackage Partials
 * @version 3.0.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
// Get excerpt length
$excerpt_length = wpex_get_mod('portfolio_entry_excerpt_length', '20');
// Return if excerpt length is set to 0
if ('0' == $excerpt_length) {
    return;
}
?>

<div class="portfolio-entry-excerpt clr">
	<?php 
wpex_excerpt(array('length' => $excerpt_length, 'readmore' => false));
?>
</div><!-- .portfolio-entry-excerpt -->
            }
            ?>

							<?php 
            // Display excerpt
            if ('true' == $excerpt) {
                ?>

								<div class="vcex-post-type-entry-excerpt clr"<?php 
                echo $excerpt_style;
                ?>
>

									<?php 
                // Display Excerpt
                wpex_excerpt(array('length' => intval($excerpt_length)));
                ?>

								</div><!-- .vcex-post-type-entry-excerpt -->

							<?php 
            }
            ?>

							<?php 
            // Display read more button
            if ('true' == $read_more) {
                ?>

								<div class="vcex-post-type-entry-readmore-wrap clr">
Exemple #21
0
    function vcex_portfolio_grid_shortcode($atts)
    {
        extract(shortcode_atts(array('unique_id' => '', 'term_slug' => '', 'include_categories' => '', 'exclude_categories' => '', 'posts_per_page' => '8', 'grid_style' => 'fit_columns', 'masonry_layout_mode' => '', 'filter_speed' => '', 'columns' => '4', 'order' => 'DESC', 'orderby' => 'date', 'orderby_meta_key' => '', 'filter' => '', 'center_filter' => 'no', 'thumb_link' => 'post', 'thumb_lightbox_gallery' => '', 'thumb_lightbox_title' => '', 'img_crop' => 'true', 'img_width' => '9999', 'img_height' => '9999', 'img_filter' => '', 'title' => 'true', 'title_link' => 'post', 'excerpt' => 'true', 'excerpt_length' => 30, 'custom_excerpt_trim' => '', 'read_more' => '', 'read_more_text' => __('read more', 'wpex'), 'pagination' => '', 'filter_content' => 'false', 'offset' => 0, 'taxonomy' => '', 'terms' => '', 'img_hover_style' => '', 'img_overlay_disable' => '', 'img_rendering' => '', 'all_text' => '', 'overlay_style' => '', 'content_heading_margin' => '', 'content_background' => '', 'content_margin' => '', 'content_font_size' => '', 'content_padding' => '', 'content_border' => '', 'content_color' => '', 'content_opacity' => '', 'content_heading_color' => '', 'content_heading_size' => '', 'content_alignment' => '', 'readmore_background' => '', 'readmore_color' => '', 'equal_heights_grid' => '', 'single_column_style' => '', 'entry_media' => ''), $atts));
        // Turn output buffer on
        ob_start();
        // Global $post
        global $post;
        // Don't create custom tax if tax doesn't exist
        if (taxonomy_exists('portfolio_category')) {
            // Include categories
            $include_categories = '' != $include_categories ? $include_categories : $term_slug;
            $include_categories = 'all' == $include_categories ? '' : $include_categories;
            $filter_cats_include = '';
            if ($include_categories) {
                $include_categories = explode(',', $include_categories);
                $filter_cats_include = array();
                foreach ($include_categories as $key) {
                    $key = get_term_by('slug', $key, 'portfolio_category');
                    $filter_cats_include[] = $key->term_id;
                }
            }
            // Exclude categories
            $filter_cats_exclude = '';
            if ($exclude_categories) {
                $exclude_categories = explode(',', $exclude_categories);
                if (!empty($exclude_categories) && is_array($exclude_categories)) {
                    $filter_cats_exclude = array();
                    foreach ($exclude_categories as $key) {
                        $key = get_term_by('slug', $key, 'portfolio_category');
                        $filter_cats_exclude[] = $key->term_id;
                    }
                    $exclude_categories = array('taxonomy' => 'portfolio_category', 'field' => 'slug', 'terms' => $exclude_categories, 'operator' => 'NOT IN');
                } else {
                    $exclude_categories = '';
                }
            }
            // Start Tax Query
            if (!empty($include_categories) && is_array($include_categories)) {
                $include_categories = array('taxonomy' => 'portfolio_category', 'field' => 'slug', 'terms' => $include_categories, 'operator' => 'IN');
            } else {
                $include_categories = '';
            }
        }
        // Meta key for orderby
        if ($orderby_meta_key && ('meta_value_num' == $orderby || 'meta_value' == $orderby)) {
            $meta_key = $orderby_meta_key;
        } else {
            $meta_key = NULL;
        }
        // Pagination variables
        $paged = NULL;
        $no_found_rows = true;
        if ('true' == $pagination) {
            global $paged;
            $paged = get_query_var('paged') ? get_query_var('paged') : 1;
            $no_found_rows = false;
        }
        // The Query
        $wpex_query = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => $posts_per_page, 'offset' => $offset, 'order' => $order, 'orderby' => $orderby, 'meta_key' => $meta_key, 'filter_content' => $filter_content, 'paged' => $paged, 'tax_query' => array('relation' => 'AND', $include_categories, $exclude_categories), 'no_found_rows' => $no_found_rows));
        //Output posts
        if ($wpex_query->posts) {
            // Set unique ID
            $unique_id = $unique_id ? $unique_id : 'portfolio-' . rand(1, 100);
            // Image hard crop
            if ('9999' == $img_height) {
                $img_crop = false;
            } else {
                $img_crop = true;
            }
            // Is Isotope var
            if ('true' == $filter || 'masonry' == $grid_style || 'no_margins' == $grid_style) {
                $is_isotope = true;
            } else {
                $is_isotope = false;
            }
            // No need for masonry if not enough columns and filter is disabled
            if ('true' != $filter && 'masonry' == $grid_style) {
                $post_count = count($wpex_query->posts);
                if ($post_count <= $columns) {
                    $is_isotope = false;
                }
            }
            // Output script for inline JS for the Visual composer front-end builder
            if ($is_isotope) {
                vcex_front_end_grid_js('isotope');
            }
            // Display filter links
            if ('true' == $filter && taxonomy_exists('portfolio_category')) {
                // Get the terms for the filter
                $terms = get_terms('portfolio_category', array('include' => $filter_cats_include, 'exclude' => $filter_cats_exclude));
                // Display filter only if terms exist and there is more then 1
                if ($terms && count($terms) > '1') {
                    // Center filter links
                    $center_filter = 'yes' == $center_filter ? 'center' : '';
                    // All text
                    if ($all_text) {
                        $all_text = $all_text;
                    } else {
                        $all_text = __('All', 'wpex');
                    }
                    ?>
						<ul class="vcex-portfolio-filter filter-<?php 
                    echo $unique_id;
                    ?>
 vcex-filter-links <?php 
                    echo $center_filter;
                    ?>
 clr">
							<li class="active"><a href="#" data-filter="*"><span><?php 
                    echo $all_text;
                    ?>
</span></a></li>
							<?php 
                    foreach ($terms as $term) {
                        ?>
								<li><a href="#" data-filter=".cat-<?php 
                        echo $term->term_id;
                        ?>
"><?php 
                        echo $term->name;
                        ?>
</a></li>
							<?php 
                    }
                    ?>
						</ul><!-- .vcex-portfolio-filter -->
					<?php 
                }
                ?>
				<?php 
            }
            // Content Design
            $content_style = '';
            if ($content_background) {
                $content_style .= 'background:' . $content_background . ';';
            }
            if ($content_padding) {
                $content_style .= 'padding:' . $content_padding . ';';
            }
            if ($content_margin) {
                $content_style .= 'margin:' . $content_margin . ';';
            }
            if ($content_border) {
                $content_style .= 'border:' . $content_border . ';';
            }
            if ($content_font_size) {
                $content_style .= 'font-size:' . $content_font_size . ';';
            }
            if ($content_color) {
                $content_style .= 'color:' . $content_color . ';';
            }
            if ($content_opacity) {
                $content_style .= 'opacity:' . $content_opacity . ';';
            }
            if ($content_alignment) {
                $content_style .= 'text-align:' . $content_alignment . ';';
            }
            if ($content_style) {
                $content_style = 'style="' . $content_style . '"';
            }
            // Heading Design
            $heading_style = '';
            if ($content_heading_margin) {
                $heading_style .= 'margin: ' . $content_heading_margin . ';';
            }
            if ($content_heading_size) {
                $heading_style .= 'font-size: ' . $content_heading_size . ';';
            }
            if ($content_heading_color) {
                $heading_style .= 'color: ' . $content_heading_color . ';';
            }
            if ($heading_style) {
                $heading_style = 'style="' . $heading_style . '"';
            }
            // Readmore design
            if ('false' != $read_more) {
                $read_more = 'true';
                // Set readmore to true
                $readmore_style = '';
                if ($readmore_background) {
                    $readmore_style .= 'background: ' . $readmore_background . ';';
                }
                if ($readmore_color) {
                    $readmore_style .= 'color: ' . $readmore_color . ';';
                }
                if ($readmore_style) {
                    $readmore_style = 'style="' . $readmore_style . '"';
                }
            }
            // Set title to true if not false
            if ('false' != $title) {
                $title = 'true';
            }
            // Set excerpt to true if not false
            if ('false' != $excerpt) {
                $excerpt = 'true';
            }
            // Default excerpt length
            if ('' == $excerpt_length) {
                $excerpt_length = '30';
            } elseif ('false' == $excerpt) {
                $excerpt_length = '0';
            }
            // Trim custom Excerpts?
            if ('false' == $custom_excerpt_trim) {
                $custom_excerpt_trim = false;
            } else {
                $custom_excerpt_trim = true;
            }
            // Only use articles if title is enabled for HTML5 validity
            if ($title == 'true') {
                $main_element_type = 'article';
            } else {
                $main_element_type = 'div';
            }
            // Main wrap classes
            $wrap_classes = 'wpex-row vcex-portfolio-grid clr';
            // Equal heights class
            if ('1' != $columns && ('fit_columns' == $grid_style && 'true' == $equal_heights_grid)) {
                $equal_heights_grid = true;
            } else {
                $equal_heights_grid = false;
            }
            // Isotope classes
            if ($is_isotope) {
                $wrap_classes .= ' vcex-isotope-grid';
            }
            // No margins grid
            if ('no_margins' == $grid_style) {
                $wrap_classes .= ' vcex-no-margin-grid';
            }
            // Left thumbnail 1 column style
            if ('left_thumbs' == $single_column_style) {
                $wrap_classes .= ' left-thumbs';
            }
            // Lightbox classes
            if ('true' == $thumb_lightbox_gallery) {
                $wrap_classes .= ' lightbox-group';
                $lightbox_single_class = ' lightbox-group-item';
            } else {
                $lightbox_single_class = ' wpex-lightbox';
            }
            // Data
            $data = '';
            if ($is_isotope && 'true' == $filter) {
                if ('no_margins' != $grid_style && $masonry_layout_mode) {
                    $data .= ' data-layout-mode="' . $masonry_layout_mode . '"';
                }
                if ($filter_speed) {
                    $data .= ' data-transition-duration="' . $filter_speed . '"';
                }
            }
            if ('no_margins' == $grid_style && 'true' != $filter) {
                $data .= ' data-transition-duration="0.0"';
            }
            ?>
		
				<div class="<?php 
            echo $wrap_classes;
            ?>
" id="<?php 
            echo $unique_id;
            ?>
"<?php 
            echo $data;
            ?>
>
					<?php 
            // Define counter var to clear floats
            $count = $count_all = '';
            // Start loop
            foreach ($wpex_query->posts as $post) {
                setup_postdata($post);
                // Open match-height-row div for equal heights
                if ($equal_heights_grid && !$is_isotope) {
                    if (0 == $count) {
                        ?>
								<div class="match-height-row clr">
							<?php 
                    }
                    $count_all++;
                }
                // Post Data
                $post_id = $post->ID;
                $post_title = get_the_title();
                $post_title_esc = esc_attr(the_title_attribute('echo=0'));
                $post_permalink = get_permalink($post_id);
                // Add to the counter var
                $count++;
                // Add classes to the entries
                $entry_classes = 'portfolio-entry col';
                $entry_classes .= ' span_1_of_' . $columns;
                $entry_classes .= ' col-' . $count;
                if ($is_isotope) {
                    $entry_classes .= ' vcex-isotope-entry';
                }
                if ('no_margins' == $grid_style) {
                    $entry_classes .= ' vcex-no-margin-entry';
                }
                if (taxonomy_exists('portfolio_category')) {
                    $post_terms = get_the_terms($post, 'portfolio_category');
                    if ($post_terms) {
                        foreach ($post_terms as $post_term) {
                            $entry_classes .= ' cat-' . $post_term->term_id;
                        }
                    }
                }
                ?>
						<<?php 
                echo $main_element_type;
                ?>
 class="<?php 
                echo $entry_classes;
                ?>
">
							<?php 
                // Entry Media
                if ('false' != $entry_media) {
                    // Video
                    if (function_exists('wpex_get_portfolio_featured_video_url') && wpex_get_portfolio_featured_video_url()) {
                        ?>
									<div class="portfolio-entry-media clr">
										<?php 
                        wpex_portfolio_post_video();
                        ?>
									</div>
								<?php 
                    } elseif (has_post_thumbnail()) {
                        // Get cropped image
                        $cropped_img = wpex_image_resize(wp_get_attachment_url(get_post_thumbnail_id()), intval($img_width), intval($img_height), $img_crop, 'array');
                        // Filter style
                        $img_filter_class = $img_filter ? 'vcex-' . $img_filter : '';
                        // Media classes
                        $media_classes = $img_filter_class;
                        if ($img_hover_style) {
                            $media_classes .= ' vcex-img-hover-parent vcex-img-hover-' . $img_hover_style;
                        }
                        if ($img_rendering) {
                            $media_classes .= ' vcex-image-rendering-' . $img_rendering;
                        }
                        if ($overlay_style) {
                            $media_classes .= ' ' . wpex_overlay_classname($overlay_style);
                        }
                        ?>
									<div class="portfolio-entry-media <?php 
                        echo $media_classes;
                        ?>
">
										<?php 
                        // No link
                        if ('nowhere' == $thumb_link) {
                            ?>
											<img src="<?php 
                            echo $cropped_img['url'];
                            ?>
" alt="<?php 
                            echo $post_title;
                            ?>
" class="portfolio-entry-img" height="<?php 
                            echo $cropped_img['height'];
                            ?>
" width="<?php 
                            echo $cropped_img['width'];
                            ?>
" />
										<?php 
                            // Lightbox
                        } elseif ('lightbox' == $thumb_link) {
                            // Display lightbox title
                            $data = '';
                            if ('true' == $thumb_lightbox_title) {
                                $data = ' data-title="' . $post_title_esc . '"';
                            }
                            ?>
												<a href="<?php 
                            echo wp_get_attachment_url(get_post_thumbnail_id());
                            ?>
" title="<?php 
                            echo $post_title_esc;
                            ?>
" class="portfolio-entry-media-link<?php 
                            echo $lightbox_single_class;
                            ?>
"<?php 
                            echo $data;
                            ?>
>
												<img src="<?php 
                            echo $cropped_img['url'];
                            ?>
" alt="<?php 
                            echo $post_title_esc;
                            ?>
" class="portfolio-entry-img" height="<?php 
                            echo $cropped_img['height'];
                            ?>
" width="<?php 
                            echo $cropped_img['width'];
                            ?>
" />
										<?php 
                            // Standarad post link
                        } else {
                            ?>
												<a href="<?php 
                            echo $post_permalink;
                            ?>
" title="<?php 
                            echo $post_title_esc;
                            ?>
" class="portfolio-entry-media-link">
												<img src="<?php 
                            echo $cropped_img['url'];
                            ?>
" alt="<?php 
                            echo $post_title_esc;
                            ?>
" class="portfolio-entry-img" height="<?php 
                            echo $cropped_img['height'];
                            ?>
" width="<?php 
                            echo $cropped_img['width'];
                            ?>
" />
										<?php 
                        }
                        ?>
											
										<?php 
                        // Close link and output overlay code
                        if ('nowhere' != $thumb_link) {
                            // Inner Overlay
                            if ($overlay_style) {
                                wpex_overlay('inside_link', $overlay_style);
                            }
                            // Close links
                            echo '</a>';
                            // Outside Overlay
                            if ($overlay_style) {
                                wpex_overlay('outside_link', $overlay_style);
                            }
                        }
                        ?>
									</div><!-- .portfolio-entry-media -->
								<?php 
                    }
                    ?>
							<?php 
                }
                ?>
							<?php 
                // Display content if there is either a title or excerpt
                if ('true' == $title || 'true' == $excerpt) {
                    ?>
								<div class="portfolio-entry-details clr" <?php 
                    echo $content_style;
                    ?>
>
									<?php 
                    // Equal height div
                    if ($equal_heights_grid && !$is_isotope) {
                        ?>
									<div class="match-height-content">
									<?php 
                    }
                    // Display the title
                    if ('false' != $title) {
                        ?>
										<h2 class="portfolio-entry-title" <?php 
                        echo $heading_style;
                        ?>
>
											<?php 
                        // Link title to post
                        if ('post' == $title_link) {
                            ?>
												<a href="<?php 
                            echo $post_permalink;
                            ?>
" title="<?php 
                            echo $post_title_esc;
                            ?>
" <?php 
                            echo $heading_style;
                            ?>
><?php 
                            echo $post_title;
                            ?>
</a>
											<?php 
                        } elseif ('lightbox' == $title_link) {
                            ?>
												<a href="<?php 
                            echo wp_get_attachment_url(get_post_thumbnail_id());
                            ?>
" title="<?php 
                            echo $post_title_esc;
                            ?>
" class="wpex-lightbox" <?php 
                            echo $heading_style;
                            ?>
><?php 
                            echo $post_title;
                            ?>
</a>
											<?php 
                        } else {
                            echo $post_title;
                        }
                        ?>
										</h2>
									<?php 
                    }
                    // Display excerpt and readmore
                    if ('true' == $excerpt || 'true' == $read_more) {
                        ?>
										<div class="portfolio-entry-excerpt clr">
											<?php 
                        // Display full content
                        if ('9999' == $excerpt_length) {
                            the_content();
                        } elseif (function_exists('wpex_excerpt')) {
                            $args = array('post_id' => $post_id, 'length' => intval($excerpt_length), 'trim_custom_excerpts' => $custom_excerpt_trim);
                            wpex_excerpt($args);
                        } else {
                            the_excerpt();
                        }
                        // Display Readmore
                        if ('false' != $read_more) {
                            // Read more string fallback
                            if ('' == $read_more_text) {
                                $read_more_text = __('read more', 'wpex');
                            }
                            ?>
												<a href="<?php 
                            echo $post_permalink;
                            ?>
" title="<?php 
                            echo $read_more_text;
                            ?>
" rel="bookmark" class="vcex-readmore theme-button" <?php 
                            echo $readmore_style;
                            ?>
>
													<?php 
                            echo $read_more_text;
                            ?>
 <span class="vcex-readmore-rarr"><?php 
                            echo wpex_element('rarr');
                            ?>
</span>
												</a>
											<?php 
                        }
                        ?>
										</div>
									<?php 
                    }
                    // Close Equal height div
                    if ($equal_heights_grid && !$is_isotope) {
                        ?>
										</div>
									<?php 
                    }
                    ?>
								</div><!-- .portfolio-entry-details -->
							<?php 
                }
                ?>
						</<?php 
                echo $main_element_type;
                ?>
><!-- .portfolio-entry -->
					<?php 
                // Check if counter equal columns
                if ($count == $columns) {
                    // Close equal height row
                    if ($equal_heights_grid && !$is_isotope) {
                        echo '</div><!-- .match-height-row -->';
                    }
                    // Reset counter
                    $count = '';
                }
                // End foreach
            }
            // Make sure match-height-row is closed
            if ($equal_heights_grid && !$is_isotope) {
                if ('4' == $columns && $count_all % 4 != 0) {
                    echo '</div><!-- .match-height-row -->';
                }
                if ('3' == $columns && $count_all % 3 != 0) {
                    echo '</div><!-- .match-height-row -->';
                }
                if ('2' == $columns && $count_all % 2 != 0) {
                    echo '</div><!-- .match-height-row -->';
                }
            }
            ?>
				</div><!-- .vcex-portfolio-grid -->
				
				<?php 
            // Paginate Posts
            if ('true' == $pagination) {
                wpex_pagination($wpex_query);
            }
            // Reset the WP query
            wp_reset_postdata();
            // End has posts check
        }
        // Return outbut buffer
        return ob_get_clean();
    }
Exemple #22
0
                    }
                    ?>
										<div class="related-post-content clr">
											<a href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    echo esc_attr(the_title_attribute('echo=0'));
                    ?>
" rel="bookmark" class="related-post-title"><?php 
                    the_title();
                    ?>
</a>
											<div class="related-post-excerpt clr">
												<?php 
                    wpex_excerpt('15', false);
                    ?>
											</div><!-- related-post-excerpt -->
										</div><!-- .related-post-content -->
									</article>
								<?php 
                }
                ?>
							 </section>
						<?php 
            }
            ?>
						<?php 
            // Reset related posts query
            wp_reset_postdata();
            ?>
Exemple #23
0
        if ('true' == $excerpt || 'true' == $read_more) {
            ?>

						<div class="vcex-recent-news-entry-excerpt clr">

							<?php 
            if ('true' == $excerpt) {
                ?>
 
								<div class="entry"<?php 
                echo $excerpt_style;
                ?>
>
									<?php 
                // Output excerpt
                wpex_excerpt(array('length' => $excerpt_length));
                ?>
								</div><!-- .entry -->
							<?php 
            }
            ?>

							<?php 
            // Display readmore link
            if ('true' == $read_more) {
                ?>

								<a href="<?php 
                echo $post->permalink;
                ?>
" title="<?php 
			<header>
				<h2 class="loop-entry-title"><a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    echo esc_attr(the_title_attribute('echo=0'));
    ?>
"><?php 
    the_title();
    ?>
</a></h2>
				<?php 
    // Display post meta details
    wpex_post_meta();
    ?>
			</header>
			<div class="loop-entry-content entry clr">
				<?php 
    if (get_theme_mod('wpex_entry_content_excerpt', 'excerpt') == 'content') {
        the_content();
    } else {
        $wpex_readmore = get_theme_mod('wpex_blog_readmore', '1') == '1' ? true : false;
        wpex_excerpt(93, $wpex_readmore);
    }
    ?>
			</div><!-- .loop-entry-content -->
		</div><!-- .loop-entry-text -->
	</article><!-- .loop-entry -->

<?php 
}
	<?php 
    }
    //featured image not set
    ?>
		<header>
			<h2><a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    the_title();
    ?>
"><?php 
    the_title();
    ?>
</a></h2>
		</header>
			<?php 
    wpex_excerpt();
    ?>
		<?php 
    if (has_post_thumbnail()) {
        ?>
		</div><!-- /search-entry-text -->
		<?php 
    }
    //featured image not set
    ?>
</article><!-- /entry -->
<?php 
    //end loop
}
	<?php 
// Display post excerpt
if ($has_excerpt) {
    ?>

		<div class="related-post-content equal-height-content clr">
			<h4 class="related-post-title">
				<a href="<?php 
    wpex_permalink();
    ?>
" title="<?php 
    wpex_esc_title();
    ?>
" rel="bookmark"><?php 
    the_title();
    ?>
</a>
			</h4><!-- .related-post-title -->
			<div class="related-post-excerpt clr">
				<?php 
    wpex_excerpt(array('length' => wpex_get_mod('blog_related_excerpt_length', '15')));
    ?>
			</div><!-- related-post-excerpt -->
		</div><!-- .related-post-content -->

	<?php 
}
?>

</article><!-- .related-post -->