echo get_post_meta($post->ID, 'pyre_custom_link_target', true);
            ?>
" class="button button_default small">View More</a>
                                                        <?php 
        } else {
            ?>
                                                            <a href="<?php 
            echo get_permalink($post->ID);
            ?>
" class="button button_default small">View More</a>
                                                        <?php 
        }
        ?>
											  	
                                        	</div>        
										</div>                                
									</div>
								   <!-- /Project Feed -->
								</div>
                        	<?php 
    }
}
?>
                    </div>                    
                </div>
                <?php 
kriesi_pagination($gallery->max_num_pages, $range = 2);
?>
 			</div>
<?php 
get_footer();
Esempio n. 2
0
					</li>
				<?php 
    }
} else {
    ?>
					<li class="post">
					<?php 
    _e("No results found.", $themename);
    ?>
					</li>
					<?php 
}
?>
				<?php 
require_once "pagination.php";
kriesi_pagination("", 2, true);
//Reset Query
wp_reset_query();
?>
			</ul>
		</div>
		<div class="page_right">
			<?php 
if (is_active_sidebar('blog')) {
    get_sidebar('blog');
}
?>
		</div>
	</div>
</div>
<?php 
Esempio n. 3
0
    function block($instance)
    {
        extract($instance);
        // Fix for pagination
        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;
        }
        /**
         * Setup post query
         */
        $query_args = array('post_type' => 'post', 'posts_per_page' => $pppage, 'paged' => $paged);
        /**
         * Set up category query if needed
         */
        if (!($filter == 'all')) {
            if (function_exists('icl_object_id')) {
                $filter = (int) icl_object_id($filter, 'category', true);
            }
            $query_args['tax_query'] = array(array('taxonomy' => 'category', 'field' => 'id', 'terms' => $filter));
        }
        $blog_query = new WP_Query($query_args);
        ?>
	
		<?php 
        if ($type == 'blogsidebar') {
            ?>
		
			<?php 
            /**
             * ebor_open_wrapper hook
             * All actions contained in /ebor_framework/theme_actions.php
             *
             * @hooked ebor_open_wrapper_markup - 10
             */
            do_action('ebor_open_wrapper');
            ?>
			  
				<div class="row blog">
				  <div class="span8 posts">
				  
				      <?php 
            if ($blog_query->have_posts()) {
                while ($blog_query->have_posts()) {
                    $blog_query->the_post();
                    ?>
				      
				        <div <?php 
                    post_class();
                    ?>
>
				          <?php 
                    /**
                     * ebor_post_title hook
                     * All actions contained in /ebor_framework/theme_actions.php
                     *
                     * @hooked ebor_post_title_markup - 10
                     */
                    do_action('ebor_post_title');
                    /**
                     * ebor_post_format hook
                     * All actions contained in /ebor_framework/theme_actions.php
                     *
                     * @hooked ebor_post_format_markup - 10
                     */
                    do_action('ebor_post_format');
                    the_content(get_option('blog_continue', 'Continue Reading &rarr;'));
                    ?>
				        </div>
				        <hr />
				        <div class="divide60"></div>
				          
				        <?php 
                }
            } else {
                get_template_part('loop/loop', 'none');
            }
            echo function_exists('kriesi_pagination') ? kriesi_pagination($blog_query->max_num_pages) : posts_nav_link();
            ?>
				    
				  </div>
				  
				  <?php 
            get_sidebar();
            ?>
				
				</div>
			
			<?php 
            /**
             * ebor_close_wrapper hook
             * All actions contained in /ebor_framework/theme_actions.php
             *
             * @hooked ebor_close_wrapper_markup - 10
             */
            do_action('ebor_close_wrapper');
            ?>
		
		<?php 
        } elseif ($type == 'blognosidebar') {
            ?>
		
			<div class="blog no-sidebar">
			  
			<?php 
            $i = 0;
            if ($blog_query->have_posts()) {
                while ($blog_query->have_posts()) {
                    $blog_query->the_post();
                    $i++;
                    echo !($i % 2 == 0) ? '<div class="dark-wrapper">' : '<div class="light-wrapper">';
                    /**
                     * ebor_open_wrapper hook
                     * All actions contained in /ebor_framework/theme_actions.php
                     *
                     * @hooked ebor_open_wrapper_markup - 10
                     */
                    do_action('ebor_open_wrapper');
                    ?>
			      
			    <div <?php 
                    post_class();
                    ?>
>
			      
			      <?php 
                    /**
                     * ebor_post_title hook
                     * All actions contained in /ebor_framework/theme_actions.php
                     *
                     * @hooked ebor_post_title_markup - 10
                     */
                    do_action('ebor_post_title');
                    /**
                     * ebor_post_format hook
                     * All actions contained in /ebor_framework/theme_actions.php
                     *
                     * @hooked ebor_post_format_markup - 10
                     */
                    do_action('ebor_post_format');
                    the_content(get_option('blog_continue', 'Continue Reading &rarr;'));
                    ?>
			      
			    </div>
			
			<?php 
                    /**
                     * ebor_close_wrapper hook
                     * All actions contained in /ebor_framework/theme_actions.php
                     *
                     * @hooked ebor_close_wrapper_markup - 10
                     */
                    do_action('ebor_close_wrapper');
                    if (!($i % 2 == 0)) {
                        echo '</div>';
                    }
                }
            } else {
                get_template_part('loop/loop', 'none');
            }
            if (kriesi_pagination()) {
                ?>
			
			    <div class="dark-wrapper">
			      <?php 
                /**
                 * ebor_open_wrapper hook
                 * All actions contained in /ebor_framework/theme_actions.php
                 *
                 * @hooked ebor_open_wrapper_markup - 10
                 */
                do_action('ebor_open_wrapper');
                echo function_exists('kriesi_pagination') ? kriesi_pagination($blog_query->max_num_pages) : posts_nav_link();
                /**
                 * ebor_close_wrapper hook
                 * All actions contained in /ebor_framework/theme_actions.php
                 *
                 * @hooked ebor_close_wrapper_markup - 10
                 */
                do_action('ebor_close_wrapper');
                ?>
			    </div>
				    
			<?php 
            }
            ?>
			    
			</div>
			
		<?php 
        } elseif ($type == 'blogshowcase') {
            ?>
			
			<div class="full-portfolio">
			
				<ul class="items">
				    
				    <?php 
            if ($blog_query->have_posts()) {
                while ($blog_query->have_posts()) {
                    $blog_query->the_post();
                    ?>
				    
				      <li <?php 
                    post_class('item overlay thumb ' . ebor_the_isotope_terms());
                    ?>
>
				          <a href="<?php 
                    the_permalink();
                    ?>
">
				          	<?php 
                    the_post_thumbnail('portfolio-index');
                    ?>
				          	<div><h5><?php 
                    the_title();
                    ?>
</h5></div>
				          </a>
				      </li>
				      
				    <?php 
                }
            } else {
                get_template_part('loop/loop', 'none');
            }
            ?>
				
				</ul>
				
				<?php 
            ebor_blog_load_more();
            ?>
			
			</div>
			
		<?php 
        }
        ?>
			
	<?php 
    }
Esempio n. 4
0
function theme_blog($atts, $content)
{
    global $themename;
    extract(shortcode_atts(array("mc_pagination" => 1, "items_per_page" => 4, "featured_image_size" => "default", "layout_type" => 1, "ids" => "", "category" => "", "order_by" => "title menu_order", "order" => "DESC", "show_post_title" => 1, "read_more" => 0, "show_post_categories" => 1, "show_post_author" => 1, "show_post_date_box" => 1, "show_post_comments_box" => 1, "show_post_comments_label" => 0, "post_date_animation" => "", "post_date_animation_duration" => 600, "post_date_animation_delay" => 0, "post_comments_animation" => "", "post_comments_animation_duration" => 600, "post_comments_animation_delay" => 0, "show_post_date_footer" => 0, "show_post_comments_footer" => 0, "lightbox_icon_color" => "blue_light", "top_margin" => 'none'), $atts));
    $featured_image_size = str_replace("mc_", "", $featured_image_size);
    $ids = explode(",", $ids);
    if ($ids[0] == "-" || $ids[0] == "") {
        unset($ids[0]);
        $ids = array_values($ids);
    }
    $category = explode(",", $category);
    if ($category[0] == "-" || $category[0] == "") {
        unset($category[0]);
        $category = array_values($category);
    }
    global $paged;
    $paged = get_query_var(is_front_page() ? 'page' : 'paged') ? get_query_var(is_front_page() ? 'page' : 'paged') : 1;
    query_posts(array('post__in' => $ids, 'post_type' => 'post', 'post_status' => 'publish', 's' => get_query_var('s'), 'paged' => $paged, 'posts_per_page' => $items_per_page, 'cat' => get_query_var('cat') != "" ? get_query_var('cat') : '', 'category_name' => get_query_var('cat') == "" ? implode(",", $category) : '', 'tag' => get_query_var('tag'), 'monthnum' => get_query_var('monthnum'), 'day' => get_query_var('day'), 'year' => get_query_var('year'), 'w' => get_query_var('week'), 'orderby' => implode(" ", explode(",", $order_by)), 'order' => $order));
    global $wp_query;
    $post_count = $wp_query->post_count;
    $output = '';
    if ((int) $layout_type == 2) {
        $output .= '<div class="columns clearfix">';
    }
    $i = 0;
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            if ($i == 0 || (int) $layout_type == 2 && $i == ceil($post_count / 2)) {
                if ($i == ceil($post_count / 2)) {
                    $output .= '</ul>';
                }
                $output .= '<ul class="blog' . ((int) $layout_type == 3 ? ' simple' : '') . ((int) $layout_type == 2 ? $i == ceil($post_count / 2) ? ' column_right' : ' column_left' : ' clearfix') . ($top_margin != "none" ? ' ' . $top_margin : '') . '">';
            }
            $post_classes = get_post_class("post");
            $output .= '<li class="' . ((int) $layout_type == 3 ? 'item_content ' : '');
            foreach ($post_classes as $key => $post_class) {
                $output .= $post_class . ($key + 1 < count($post_classes) ? ' ' : '');
            }
            $output .= '">';
            if ((int) $layout_type != 3) {
                if ((int) $layout_type != 2 || (int) $show_post_date_box || (int) $show_post_comments_box) {
                    $output .= '<ul class="comment_box clearfix">';
                    if ((int) $layout_type != 2 || (int) $show_post_date_box) {
                        $output .= '<li class="date' . ((int) $layout_type != 2 ? ' clearfix' : '') . ($post_date_animation != '' ? ' animated_element animation-' . $post_date_animation . ((int) $post_date_animation_duration > 0 && (int) $post_date_animation_duration != 600 ? ' duration-' . (int) $post_date_animation_duration : '') . ((int) $post_date_animation_delay > 0 ? ' delay-' . (int) $post_date_animation_delay : '') : '') . '">
								<div class="value">' . mb_strtoupper(date_i18n("d M y", get_post_time())) . '</div>
								<div class="arrow_date"></div>
							</li>';
                    }
                    if ((int) $show_post_comments_box) {
                        $output .= '<li class="comments_number' . ($post_comments_animation != '' ? ' animated_element animation-' . $post_comments_animation . ((int) $post_comments_animation_duration > 0 && (int) $post_comments_animation_duration != 600 ? ' duration-' . (int) $post_comments_animation_duration : '') . ((int) $post_comments_animation_delay > 0 ? ' delay-' . (int) $post_comments_animation_delay : '') : '') . '">';
                        $comments_count = get_comments_number();
                        $output .= '			<a href="' . get_comments_link() . '" title="' . $comments_count . ' ' . ($comments_count == 1 ? __('comment', 'medicenter') : __('comments', 'medicenter')) . '">' . $comments_count . ((int) $show_post_comments_label ? ' ' . ($comments_count == 1 ? __('comment', 'medicenter') : __('comments', 'medicenter')) : '') . '</a>
							</li>';
                    }
                    $output .= '</ul>';
                }
                $output .= '<div class="post_content">';
                $show_images_in = get_post_meta(get_the_ID(), $themename . "_show_images_in", true);
                $attachment_ids = get_post_meta(get_the_ID(), $themename . "_attachment_ids", true);
                $images = get_post_meta(get_the_ID(), $themename . "_images", true);
                $images_count = count((array) $images);
                if ($images_count > 0 && ($show_images_in == "blog" || $show_images_in == "both")) {
                    $images_titles = get_post_meta(get_the_ID(), $themename . "_images_titles", true);
                    $videos = get_post_meta(get_the_ID(), $themename . "_videos", true);
                    $iframes = get_post_meta(get_the_ID(), $themename . "_iframes", true);
                    $external_urls = get_post_meta(get_the_ID(), $themename . "_external_urls", true);
                    $features_images_loop = get_post_meta(get_the_ID(), $themename . "_features_images_loop", true);
                    $output .= '<div class="gallery_box">
								<ul class="image_carousel">';
                    if (has_post_thumbnail()) {
                        $thumb_id = get_post_thumbnail_id(get_the_ID());
                        $attachment_image = wp_get_attachment_image_src($thumb_id, "large");
                        $large_image_url = $attachment_image[0];
                        $thumbnail_image = get_posts(array('p' => $thumb_id, 'post_type' => 'attachment'));
                        $output .= '<li><span class="mc_preloader"></span>
									' . get_the_post_thumbnail(get_the_ID(), $featured_image_size != "default" ? $featured_image_size : ($layout_type == 2 ? $themename . "-gallery-image" : "blog-post-thumb"), array("alt" => get_the_title(), "title" => "")) . '
										<ul class="controls">
											<li>
												<a href="' . $large_image_url . '" title="' . esc_attr($thumbnail_image[0]->post_title) . '" class="fancybox open_lightbox"' . ($features_images_loop == "yes" ? ' rel="featured_' . get_the_ID() . '"' : '') . ' style="background-image: url(\'' . get_template_directory_uri() . '/images/icons_media/' . $lightbox_icon_color . '/image.png\')"></a>
											</li>
										</ul>
									</li>';
                    }
                    for ($j = 0; $j < $images_count; $j++) {
                        $output .= '<li>' . ($j == 0 && !has_post_thumbnail() ? '<span class="mc_preloader"></span>' : '') . wp_get_attachment_image((int) $attachment_ids[$j], $featured_image_size != "default" ? $featured_image_size : ($layout_type == 2 ? $themename . "-gallery-image" : "blog-post-thumb"), array("alt " => "")) . '
										<ul class="controls">
											<li>
												<a' . (isset($external_urls[$j]) && $external_urls[$j] != "" ? ' target="_blank"' : '') . ' href="' . (isset($external_urls[$j]) && $external_urls[$j] != "" ? $external_urls[$j] : (isset($iframes[$j]) && $iframes[$j] != "" ? $iframes[$j] : (isset($videos[$j]) && $videos[$j] != "" ? $videos[$j] : $images[$j]))) . '" title="' . (isset($images_titles[$j]) ? esc_attr($images_titles[$j]) : '') . '" class="fancybox' . (isset($external_urls[$j]) && $external_urls[$j] != "" ? '-externalurl' : (isset($iframes[$j]) && $iframes[$j] != "" ? '-iframe' : (isset($videos[$j]) && $videos[$j] != "" ? '-video' : ''))) . ' open_' . (isset($external_urls[$j]) && $external_urls[$j] != "" || isset($iframes[$j]) && $iframes[$j] != "" ? 'iframe_' : (isset($videos[$j]) && $videos[$j] != "" ? 'video_' : '')) . 'lightbox"' . ($features_images_loop == "yes" ? ' rel="featured_' . get_the_ID() . '"' : '') . ' style="background-image: url(\'' . get_template_directory_uri() . '/images/icons_media/' . $lightbox_icon_color . '/' . (isset($videos[$j]) && $videos[$j] != "" ? 'video' : (isset($iframes[$j]) && $iframes[$j] != "" || isset($external_urls[$j]) && $external_urls[$j] != "" ? 'url' : 'image')) . '.png\')"></a>
											</li>
										</ul>
									</li>';
                    }
                    $output .= '</ul>
							</div>';
                } else {
                    if (has_post_thumbnail()) {
                        $output .= '<a class="post_image" href="' . get_permalink() . '" title="' . get_the_title() . '"><span class="mc_preloader"></span>' . get_the_post_thumbnail(get_the_ID(), $featured_image_size != "default" ? $featured_image_size : ($layout_type == 2 ? $themename . "-gallery-image" : "blog-post-thumb"), array("alt" => get_the_title(), "title" => "")) . '</a>';
                    }
                }
            } else {
                if (has_post_thumbnail()) {
                    $output .= '<a class="thumb_image" href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_post_thumbnail(get_the_ID(), $featured_image_size != "default" ? $featured_image_size : $themename . "-small-thumb", array("alt" => get_the_title(), "title" => "")) . '</a>';
                } else {
                    $attachment_ids = get_post_meta(get_the_ID(), $themename . "_attachment_ids", true);
                    $images = get_post_meta(get_the_ID(), $themename . "_images", true);
                    $images_count = count((array) $images);
                    if ($images_count > 0) {
                        $output .= '<a class="thumb_image" href="' . get_permalink() . '" title="' . get_the_title() . '">' . wp_get_attachment_image((int) $attachment_ids[0], $featured_image_size != "default" ? $featured_image_size : $themename . "-small-thumb", array("alt " => get_the_title(), "title" => "")) . '</a>';
                    }
                }
            }
            if ((int) $layout_type == 3) {
                $output .= '<div class="text">';
            }
            if ((int) $show_post_title) {
                $output .= ((int) $layout_type == 3 ? '<h3> ' : '<h2>') . '<a href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a>' . ((int) $layout_type == 3 ? '</h3> ' : '</h2>');
            }
            $output .= apply_filters('the_excerpt', get_the_excerpt() . ((int) $read_more && (int) $layout_type == 3 ? '<a title="' . __('Read more', 'medicenter') . '" href="' . get_permalink() . '" class="more">' . __('Read more &rarr;', 'medicenter') . '</a>' : ''));
            if ((int) $layout_type == 3) {
                $output .= '</div>';
            }
            if ((int) $read_more && (int) $layout_type != 3) {
                $output .= '<a title="' . __('Read more', 'medicenter') . '" href="' . get_permalink() . '" class="more">' . __('Read more &rarr;', 'medicenter') . '</a>';
            }
            if ((int) $show_post_categories || (int) $show_post_author || (int) $show_post_date_footer) {
                $output .= '		<div class="post_footer clearfix">';
                if ((int) $show_post_categories) {
                    $output .= '<ul class="post_footer_details">';
                    $categories = get_the_category();
                    $output .= '<li>' . __('Posted in ', 'medicenter') . '</li>';
                    foreach ($categories as $key => $category) {
                        $output .= '<li>
											<a href="' . get_category_link($category->term_id) . '" ';
                        if (empty($category->description)) {
                            $output .= 'title="' . sprintf(__('View all posts filed under %s', 'medicenter'), $category->name) . '"';
                        } else {
                            $output .= 'title="' . esc_attr(strip_tags(apply_filters('category_description', $category->description, $category))) . '"';
                        }
                        $output .= '>' . $category->name . '</a>' . ($category != end($categories) ? ', ' : '') . '
										</li>';
                    }
                    $output .= '			</ul>';
                }
                if ((int) $show_post_author) {
                    $output .= '<ul class="post_footer_details">
									<li>' . __('Posted by', 'medicenter') . '</li>
									<li>
										' . (get_the_author_meta("user_url") != "" ? '<a class="author" href="' . get_the_author_meta("user_url") . '" title="' . get_the_author() . '">' . get_the_author() . '</a>' : get_the_author()) . '
									</li>
								</ul>';
                }
                if ((int) $show_post_date_footer) {
                    $output .= '<ul class="post_footer_details">
									<li>' . __('Posted on', 'medicenter') . '</li>
									<li>
										' . date_i18n("d M y", get_post_time()) . '
									</li>
								</ul>';
                }
                if ((int) $show_post_comments_footer) {
                    $comments_count = get_comments_number();
                    $output .= '<ul class="post_footer_details">
									<li>
										' . __('Comments:', 'medicenter') . ' <a href="' . get_comments_link() . '" title="' . $comments_count . ' ' . ($comments_count == 1 ? __('comment', 'medicenter') : __('comments', 'medicenter')) . '">' . $comments_count . '</a>
									</li>
								</ul>';
                }
                $output .= '</div>';
            }
            $output .= ((int) $layout_type != 3 ? '</div>' : '') . '</li>';
            $i++;
        }
    } elseif (is_search()) {
        $output .= '<div class="vc_row wpb_row vc_row-fluid page_margin_top">' . sprintf(__('No results found for %s', 'pressroom'), get_query_var('s')) . '</div>';
    }
    $output .= '</ul>';
    if ((int) $layout_type == 2) {
        $output .= '</div>';
    }
    if ($mc_pagination) {
        require_once locate_template("pagination.php");
        $output .= kriesi_pagination(false, '', 2, false, false, '', 'page_margin_top');
    }
    //Reset Query
    wp_reset_query();
    return $output;
}
Esempio n. 5
0
        
        <?php 
get_template_part('templates/compare_list');
?>
 
        
        <!-- Listings starts here -->                   
        <?php 
get_template_part('templates/spiner');
?>
 
        <div id="listing_ajax_container" class="row"> 
            <?php 
print $templates;
?>
        </div>
        <!-- Listings Ends  here --> 
        
        
        
        <?php 
kriesi_pagination($prop_selection->max_num_pages, $range = 2);
?>
       
    
    </div><!-- end 8col container-->
    
<?php 
include locate_template('sidebar.php');
?>
</div>   
Esempio n. 6
0
						<span class="pright"><a href="<?php 
    echo get_post_meta($post->ID, '_product_info_product_link', true);
    ?>
">Buy Now</a> </span>
					</div>
				</div>
					
			</div>
			

				<?php 
}
?>
</div>
				<?php 
//web2feel_content_nav( 'nav-below' );
?>
				<div class="grid_12">
				<?php 
kriesi_pagination("{$wp_query->max_num_pages}");
?>
				
				</div>
				
			

			</div><!-- #content .site-content -->
		</div><!-- #primary .content-area -->

<?php 
get_footer();
Esempio n. 7
0
function portfolio_sc($atts, $content = null)
{
    global $rd_data;
    extract(shortcode_atts(array('heading_size' => '', 'heading_color' => '', 'heading_text' => '', 'port_start' => '8', 'port_click' => '4', 'port_layout' => '1 column', 'port_type' => 'port_type_1', 'port_bg_color' => '', 'port_title_color' => '', 'port_text_color' => '', 'port_button_color' => '', 'port_border_color' => '', 'port_hover_bg_color' => '', 'port_hover_title_color' => '', 'port_hover_text_color' => '', 'port_hover_button_color' => '', 'port_hover_border_color' => '', 'port_thumbnail' => 'thumbnail_type_1', 'filter' => '', 'filter_type' => 'filter_type_1', 'desc_border' => '', 'icon' => '', 'port_navigation' => '', 'nav_bg' => '', 'nav_color' => '', 'nav_border' => '', 'nav_hover_color' => '', 'nav_hover_bg' => '', 'button_bg' => '', 'button_title' => '', 'button_border' => '', 'button_hover_title' => '', 'button_hover_bg' => '', 'desc_bg' => '', 'desc_title' => '', 'desc_cat' => '', 'title_pos' => '', 'filter_text_color' => '', 'filter_background_color' => '', 'selected_filter_bg_color' => '', 'filter_border_color' => '', 'category' => 'all', 'tags' => 'all', 'overlay' => 'rd_hover_white', 'overlay_color' => '', 'overlay_color_2' => ''), $atts));
    ob_start();
    global $rd_data;
    $portfolio_rand_class = RandomString(20);
    $items_on_start = $port_start;
    $items_per_click = $port_click;
    $view_type = $port_layout;
    $tags = $tags;
    if ($items_on_start < 1) {
        $items_on_start = 4;
    }
    if ($items_per_click < 1) {
        $items_per_click = 4;
    }
    echo '<script>jQuery.noConflict(); var $ = jQuery; </script>';
    wp_enqueue_script('js_isotope', get_template_directory_uri() . '/js/jquery.isotope.min.js', array(), false, false);
    wp_enqueue_script('js_sorting', get_template_directory_uri() . '/js/sorting.js');
    if ($port_bg_color == '') {
        $port_bg_color = $rd_data['rd_content_bg_color'];
    }
    if ($port_title_color == '') {
        $port_title_color = $rd_data['rd_content_heading_color'];
    }
    if ($port_text_color == '') {
        $port_text_color = $rd_data['rd_content_text_color'];
    }
    if ($port_button_color == '') {
        $port_button_color = $rd_data['rd_content_heading_color'];
    }
    if ($port_border_color == '') {
        $port_border_color = $rd_data['rd_content_border_color'];
    }
    if ($port_hover_bg_color == '') {
        $port_hover_bg_color = $rd_data['rd_content_heading_color'];
    }
    if ($port_hover_title_color == '') {
        $port_hover_title_color = $rd_data['rd_content_bg_color'];
    }
    if ($port_hover_text_color == '') {
        $port_hover_text_color = $rd_data['rd_content_text_color'];
    }
    if ($port_hover_button_color == '') {
        $port_hover_button_color = $rd_data['rd_content_hl_color'];
    }
    if ($port_hover_border_color == '') {
        $port_hover_border_color = $rd_data['rd_content_heading_color'];
    }
    if ($filter_background_color == '') {
        $filter_background_color = $rd_data['rd_content_bg_color'];
    }
    if ($filter_text_color == '') {
        $filter_text_color = $rd_data['rd_content_text_color'];
    }
    if ($selected_filter_bg_color == '') {
        $selected_filter_bg_color = $rd_data['rd_content_hl_color'];
    }
    if ($filter_border_color == '') {
        $filter_border_color = $rd_data['rd_content_border_color'];
    }
    if ($nav_bg == '') {
        $nav_bg = $rd_data['rd_content_bg_color'];
    }
    if ($nav_color == '') {
        $nav_color = $rd_data['rd_content_text_color'];
    }
    if ($button_hover_bg == '') {
        $button_hover_bg = $rd_data['rd_content_hl_color'];
    }
    if ($nav_hover_color == '') {
        $nav_hover_color = $rd_data['rd_content_bg_color'];
    }
    if ($nav_border == '') {
        $nav_border = $rd_data['rd_content_border_color'];
    }
    if ($button_bg == '') {
        $button_bg = $rd_data['rd_content_bg_color'];
    }
    if ($button_title == '') {
        $button_title = $rd_data['rd_content_heading_color'];
    }
    if ($button_hover_bg == '') {
        $button_hover_bg = $rd_data['rd_content_hl_color'];
    }
    if ($button_hover_title == '') {
        $button_hover_title = $rd_data['rd_content_bg_color'];
    }
    if ($button_border == '') {
        $button_border = $rd_data['rd_content_border_color'];
    }
    ////////////////////////////////////////////
    ////                                    ///
    ///        Set Portfolio Container     ///
    //                                    ///
    ////////////////////////////////////////
    echo '<div id="random' . $portfolio_rand_class . '_port" class="portfolio">';
    ////////////////////////////////////////////
    ////                                    ///
    ///              Filter                ///
    //                                    ///
    ////////////////////////////////////////
    /// Type 1
    if ($filter_type == 'filter_type_1') {
        $output = '<style>';
        if ($selected_filter_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options .selected a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a:hover{background:' . $selected_filter_bg_color . '; border:1px solid ' . $selected_filter_bg_color . '; color:#fff;}';
        }
        if ($filter_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a{border:1px solid ' . $filter_border_color . '}';
        }
        if ($filter_background_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a{background:' . $filter_background_color . '}';
        }
        if ($filter_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a{color:' . $filter_text_color . '}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    /// Type 2
    if ($filter_type == 'filter_type_2') {
        $output = '<style>';
        if ($selected_filter_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options .selected a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a:hover{color:' . $selected_filter_bg_color . '; }';
        }
        if ($filter_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a{border:1px solid ' . $filter_border_color . '; border-right:none;}';
        }
        if ($filter_background_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a{background:' . $filter_background_color . '}';
        }
        if ($filter_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a{color:' . $filter_text_color . '}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    /// Type 3
    if ($filter_type == 'filter_type_3') {
        $output = '<style>';
        if ($selected_filter_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options .selected a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts .is-checked{color:' . $selected_filter_bg_color . ' !important; }';
        }
        if ($filter_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options ,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{border:1px solid ' . $filter_border_color . ';}';
        }
        if ($filter_background_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options{background:' . $filter_background_color . '}';
        }
        if ($filter_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{color:' . $filter_text_color . '}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    /// Type 4
    if ($filter_type == 'filter_type_4') {
        $output = '<style>';
        if ($selected_filter_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options .selected a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts .is-checked{color:' . $selected_filter_bg_color . ' !important; }';
        }
        if ($filter_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{border:1px solid ' . $filter_border_color . ';}';
        }
        if ($filter_background_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{background:' . $filter_background_color . '}#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a{background:none!important;}';
        }
        if ($filter_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{color:' . $filter_text_color . '}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    /// Type 5
    if ($filter_type == 'filter_type_5') {
        $output = '<style>';
        if ($selected_filter_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options .selected a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts .is-checked{color:' . $selected_filter_bg_color . ' !important; }';
        }
        if ($filter_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{border:1px solid ' . $filter_border_color . ';}';
        }
        if ($filter_background_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{background:' . $filter_background_color . '}#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a{background:none!important;}';
        }
        if ($filter_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{color:' . $filter_text_color . '}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    /// Type 6
    if ($filter_type == 'filter_type_6') {
        $output = '<style>';
        if ($selected_filter_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options .selected a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts .is-checked{color:' . $selected_filter_bg_color . ' !important; }';
        }
        if ($filter_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{border:1px solid ' . $filter_border_color . ';}';
        }
        if ($filter_background_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{background:' . $filter_background_color . '}#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a{background:none!important;}';
        }
        if ($filter_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{color:' . $filter_text_color . '}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    /// Type 7
    if ($filter_type == 'filter_type_7') {
        $output = '<style>';
        if ($selected_filter_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options .selected a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts .is-checked{color:' . $selected_filter_bg_color . ' !important; }';
        }
        if ($filter_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{border:1px solid ' . $filter_border_color . ';}#random' . $portfolio_rand_class . '_port .' . $filter_type . '{border-top:1px solid ' . $filter_border_color . '; border-bottom:double 3px ' . $filter_border_color . ';}';
        }
        if ($filter_background_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a{background:rgba(255,255,255,0);}#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts a{background:' . $filter_background_color . ' !important;}';
        }
        if ($filter_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{color:' . $filter_text_color . '}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    /// Type 4
    if ($filter_type == 'filter_type_8') {
        $output = '<style>';
        if ($selected_filter_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options .selected a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' .portfolio_sorts .is-checked{color:' . $selected_filter_bg_color . ' !important; }';
        }
        if ($filter_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #options a,#random' . $portfolio_rand_class . '_port .' . $filter_type . ' #sorts{color:' . $filter_text_color . '}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    ////////////////////////////////////////////
    ////                                    ///
    ///             Set Overlay effect     ///
    //                                    ///
    ////////////////////////////////////////
    if ($overlay == 'rd_hover_white' || $overlay == 'rd_hover_whiteic' || $overlay == 'rd_hover_gradient') {
        echo '<style>#random' . $portfolio_rand_class . '_port .portfolio_desc{ position:absolute; bottom:10%; width:100%; height:40px; padding:0; border:none!important; background:none!important; text-align:center; z-index:3; opacity:0;}#random' . $portfolio_rand_class . '_port .element:hover .portfolio_desc{opacity:1; bottom:50%;}#random' . $portfolio_rand_class . '_port  .element:hover .img_link{left:4px;  opacity:1;}#random' . $portfolio_rand_class . '_port  .element:hover .post_link{right:4px; opacity:1;}';
        if ($overlay == 'rd_hover_white') {
            echo '#random' . $portfolio_rand_class . '_port .element:hover .port_overlay{ background:#fff; opacity:1;}';
        }
        if ($overlay == 'rd_hover_whiteic') {
            echo '#random' . $portfolio_rand_class . '_port .element:hover .port_overlay{ background:#fff; opacity:1; }#random' . $portfolio_rand_class . '_port .post_link{background:#444;}#random' . $portfolio_rand_class . '_port .post_link:before{color:#fff;}#random' . $portfolio_rand_class . '_port .img_link{border:1px solid #444;}#random' . $portfolio_rand_class . '_port .img_link:before{color:#444;}';
        }
        if ($overlay == 'rd_hover_gradient') {
            if ($overlay_color_2 == '') {
                echo '#random' . $portfolio_rand_class . '_port .element:hover .port_overlay,.portfolio_desc:hover .port_overlay{ background:' . $overlay_color . '; opacity:1; }#random' . $portfolio_rand_class . '_port .portfolio_desc h2 a,#random' . $portfolio_rand_class . '_port .portfolio_desc h3{color:#ffffff !important}';
            } else {
                echo '#random' . $portfolio_rand_class . '_port .element:hover .port_overlay,.portfolio_desc:hover .port_overlay{ opacity:1; background: ' . $overlay_color . ';  background: -moz-linear-gradient(left, ' . $overlay_color . ' 0%, ' . $overlay_color_2 . ' 100%);  background: -webkit-gradient(linear, left top, right top, color-stop(0%,' . $overlay_color . '), color-stop(100%,' . $overlay_color_2 . ')); background: -webkit-linear-gradient(left, ' . $overlay_color . ' 0%,' . $overlay_color_2 . ' 100%);  background: -o-linear-gradient(left, ' . $overlay_color . ' 0%,' . $overlay_color_2 . ' 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(left, ' . $overlay_color . ' 0%,' . $overlay_color_2 . ' 100%);  background: linear-gradient(to right, ' . $overlay_color . ' 0%,' . $overlay_color_2 . ' 100%);  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="' . $overlay_color . '", endColorstr="' . $overlay_color_2 . '",GradientType=1 );  }#random' . $portfolio_rand_class . '_port .portfolio_desc h2 a,#random' . $portfolio_rand_class . '_port .portfolio_desc h3{color:#ffffff !important}';
            }
        }
        if ($overlay == 'rd_hover_whiteic' || $overlay == 'rd_hover_gradient') {
            echo '#random' . $portfolio_rand_class . '_port .portfolio_desc{margin-bottom:-55px;}.img_link,.post_link{margin-top:-55px;}</style>';
        } else {
            echo '#random' . $portfolio_rand_class . '_port .portfolio_desc{margin-bottom:-20px;}.img_link,.post_link{display:none;}</style>';
        }
        if ($desc_cat !== '') {
            echo '<style>#random' . $portfolio_rand_class . '_port .portfolio_desc h3{color:' . $desc_cat . '}</style>';
        }
    }
    if ($overlay == 'rd_hover_lily' || $overlay == 'rd_hover_goliath' || $overlay == 'rd_hover_steve') {
        echo '<style>#random' . $portfolio_rand_class . '_port figcaption h2{color:' . $desc_title . ';}#random' . $portfolio_rand_class . '_port figcaption p{color:' . $desc_cat . ';}#random' . $portfolio_rand_class . '_port .ico_link{background:' . $overlay_color . '!important;}</style>';
    }
    if ($overlay == 'rd_hover_sadie') {
        echo '<style>#random' . $portfolio_rand_class . '_port figcaption h2{color:' . $desc_title . ';}#random' . $portfolio_rand_class . '_port figcaption p{color:' . $desc_cat . ';}#random' . $portfolio_rand_class . '_port figcaption::before{background: -webkit-linear-gradient(top, rgba(72,76,97,0) 0%, ' . $overlay_color . ' 75%); background: linear-gradient(to bottom, rgba(72,76,97,0) 0%, ' . $overlay_color . ' 75%);</style>';
    }
    if ($overlay == 'rd_hover_bubba' || $overlay == 'rd_hover_chico' || $overlay == 'rd_hover_roxy' || $overlay == 'rd_hover_layla') {
        echo '<style>#random' . $portfolio_rand_class . '_port .ico_link{background:' . $overlay_color . '!important;}</style>';
    }
    if ($overlay == 'rd_hover_trending') {
        echo '<style>#random' . $portfolio_rand_class . '_port .port_overlay{background:' . $overlay_color . '!important;}</style>';
    }
    ////////////////////////////////////////////
    ////                                    ///
    ///        Portfolio  Desing           ///
    //                                    ///
    ////////////////////////////////////////
    if ($port_type == 'port_type_2') {
        $output = '<style>';
        if ($port_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .filter_img{border:1px solid ' . $port_border_color . '; border-bottom:none;}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    if ($port_type == 'port_type_4') {
        $output = '<style>';
        if ($port_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .filter_img{border:1px solid ' . $port_border_color . ';}';
        }
        if ($port_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .portfolio_desc {background:' . $port_bg_color . '}';
        }
        if ($port_title_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .portfolio_desc a h2{color:' . $port_title_color . '}';
        }
        if ($port_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .portfolio_desc h3{color:' . $port_text_color . '}';
        }
        if ($port_hover_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .filter_img{border:1px solid ' . $port_hover_border_color . ';}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    if ($port_type == 'port_type_5') {
        $output = '<style>';
        if ($port_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .filter_img{border:1px solid ' . $port_border_color . '; border-bottom:none;}#random' . $portfolio_rand_class . '_port .port_item_details{border:1px solid ' . $port_border_color . '; border-top:none;}';
        }
        if ($port_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details {background:' . $port_bg_color . '}';
        }
        if ($port_title_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details a h2{color:' . $port_title_color . '}';
        }
        if ($port_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details h3{color:' . $port_text_color . '}';
        }
        if ($port_hover_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .filter_img{border:1px solid ' . $port_hover_border_color . '; border-bottom:none;}#random' . $portfolio_rand_class . '_port .element:hover .port_item_details{border:1px solid ' . $port_hover_border_color . '; border-top:none;}';
        }
        if ($port_hover_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details{background:' . $port_hover_bg_color . '}';
        }
        if ($port_hover_title_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details a h2{color:' . $port_hover_title_color . '}';
        }
        if ($port_hover_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details h3{color:' . $port_hover_text_color . '}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    if ($port_type == 'port_type_6') {
        $output = '<style>';
        if ($port_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .filter_img{border:1px solid ' . $port_border_color . '; border-top:none;}#random' . $portfolio_rand_class . '_port .port_item_details{border:1px solid ' . $port_border_color . '; border-bottom:none;}';
        }
        if ($port_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details {background:' . $port_bg_color . '}';
        }
        if ($port_title_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details a h2{color:' . $port_title_color . '}';
        }
        if ($port_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details h3{color:' . $port_text_color . '}';
        }
        if ($port_hover_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .filter_img{border:1px solid ' . $port_hover_border_color . '; border-top:none;}#random' . $portfolio_rand_class . '_port .element:hover .port_item_details{border:1px solid ' . $port_hover_border_color . '; border-bottom:none;}';
        }
        if ($port_hover_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details{background:' . $port_hover_bg_color . '}';
        }
        if ($port_hover_title_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details a h2{color:' . $port_hover_title_color . '}';
        }
        if ($port_hover_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details h3{color:' . $port_hover_text_color . '}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    if ($port_type == 'port_type_7') {
        $output = '<style>';
        if ($port_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .filter_img{border-right:1px solid ' . $port_border_color . ';}#random' . $portfolio_rand_class . '_port .item_details_info{border-top:1px solid ' . $port_border_color . '; border-bottom:1px solid ' . $port_border_color . '; }';
        }
        if ($port_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details {background:' . $port_bg_color . '}';
        }
        if ($port_title_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details a h2{color:' . $port_title_color . '}';
        }
        if ($port_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details h3,#random' . $portfolio_rand_class . '_port .port_item_details{color:' . $port_text_color . '}';
        }
        if ($port_button_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .view-portfolio-item{color:' . $port_button_color . '; border:1px solid ' . $port_button_color . '; background:' . $port_bg_color . ';}#random' . $portfolio_rand_class . '_port .view-portfolio-pp{color:' . $port_bg_color . '; border:1px solid ' . $port_title_color . '; background:' . $port_title_color . ';}';
        }
        if ($port_hover_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .filter_img{border-right:1px solid ' . $port_hover_border_color . ';}#random' . $portfolio_rand_class . '_port .element:hover .item_details_info{border-top:1px solid ' . $port_hover_border_color . '; border-bottom:1px solid ' . $port_hover_border_color . '; }';
        }
        if ($port_hover_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details {background:' . $port_hover_bg_color . '}';
        }
        if ($port_hover_title_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details a h2{color:' . $port_hover_title_color . '}';
        }
        if ($port_hover_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details h3,#random' . $portfolio_rand_class . '_port .element:hover .port_item_details{color:' . $port_hover_text_color . '}';
        }
        if ($port_hover_button_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .view-portfolio-item{color:' . $port_hover_title_color . '; border:1px solid ' . $port_hover_button_color . '; background:' . $port_hover_button_color . ';}#random' . $portfolio_rand_class . '_port .element:hover .view-portfolio-pp{color:' . $port_hover_bg_color . '; border:1px solid ' . $port_hover_title_color . '; background:' . $port_hover_title_color . ';}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    if ($port_type == 'port_type_7' || $port_type == 'port_type_8') {
        $output = '<style>';
        if ($port_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .filter_img{border-right:1px solid ' . $port_border_color . ';}#random' . $portfolio_rand_class . '_port .item_details_info{border-top:1px solid ' . $port_border_color . '; border-bottom:1px solid ' . $port_border_color . '; }#random' . $portfolio_rand_class . '_port .port_item_details{border-right:1px solid ' . $port_border_color . '; border-bottom:1px solid ' . $port_border_color . '; }#random' . $portfolio_rand_class . '_port .element:first-child .port_item_details {border-top:1px solid ' . $port_border_color . ';}';
        }
        if ($port_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details {background:' . $port_bg_color . '}';
        }
        if ($port_title_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details a h2{color:' . $port_title_color . '}';
        }
        if ($port_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details h3,#random' . $portfolio_rand_class . '_port .port_item_details{color:' . $port_text_color . '}';
        }
        if ($port_button_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .view-portfolio-item{color:' . $port_button_color . '; border:1px solid ' . $port_button_color . '; background:' . $port_bg_color . ';}#random' . $portfolio_rand_class . '_port .view-portfolio-pp{color:' . $port_bg_color . '; border:1px solid ' . $port_title_color . '; background:' . $port_title_color . ';}';
        }
        if ($port_hover_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .filter_img{border-right:1px solid ' . $port_hover_border_color . ';}#random' . $portfolio_rand_class . '_port .element:hover .item_details_info{border-top:1px solid ' . $port_hover_border_color . '; border-bottom:1px solid ' . $port_hover_border_color . '; }';
        }
        if ($port_hover_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details {background:' . $port_hover_bg_color . '}';
        }
        if ($port_hover_title_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details a h2{color:' . $port_hover_title_color . '}';
        }
        if ($port_hover_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .port_item_details h3,#random' . $portfolio_rand_class . '_port .element:hover .port_item_details{color:' . $port_hover_text_color . '}';
        }
        if ($port_hover_button_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:hover .view-portfolio-item{color:' . $port_hover_title_color . '; border:1px solid ' . $port_hover_button_color . '; background:' . $port_hover_button_color . ';}#random' . $portfolio_rand_class . '_port .element:hover .view-portfolio-pp{color:' . $port_hover_bg_color . '; border:1px solid ' . $port_hover_title_color . '; background:' . $port_hover_title_color . ';}';
        }
        if ($port_type == 'port_type_8') {
            $output .= '#random' . $portfolio_rand_class . '_port .element:nth-child(even) .filter_img{float:right; border-left:1px solid ' . $port_border_color . ';  border-right:none!important;}#random' . $portfolio_rand_class . '_port .element:nth-child(even) .port_item_details{float:left; border-left:1px solid ' . $port_border_color . ';  border-right:none!important;}#random' . $portfolio_rand_class . '_port .element:hover:nth-child(even) .filter_img{border-left:1px solid ' . $port_hover_border_color . '; border-right:none!important;}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    if ($port_type == 'port_type_9') {
        $output = '<style>#random' . $portfolio_rand_class . '_port .element{margin-bottom:30px;}';
        if ($port_border_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .filter_img{border-right:1px solid ' . $port_border_color . ';}';
        }
        if ($port_bg_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details {background:' . $port_bg_color . '}';
        }
        if ($port_title_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details a h2{color:' . $port_title_color . '}';
        }
        if ($port_text_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .port_item_details h3,#random' . $portfolio_rand_class . '_port .port_item_details{color:' . $port_text_color . '}';
        }
        if ($port_button_color !== '') {
            $output .= '#random' . $portfolio_rand_class . '_port .view-portfolio-item{color:#ffffff; border:1px solid ' . $port_button_color . '; background:' . $port_button_color . ';}#random' . $portfolio_rand_class . '_port .view-portfolio-pp{color:#ffffff; border:1px solid ' . $port_title_color . '; background:' . $port_title_color . ';}';
        }
        $output .= '</style>';
        echo !empty($output) ? $output : '';
    }
    ////////////////////////////////////////////
    ////                                    ///
    ///        Creating Portfolio          ///
    //                                    ///
    ////////////////////////////////////////
    if ($filter !== '') {
        if ($tags == "all" || $tags == "") {
            echo '
				<div id="portfolio-tags" class="' . $filter_type . '">
				<ul class="splitter" id="options">';
            if ($filter_type == 'filter_type_2') {
                echo '<li style="border-right:1px solid ' . $filter_border_color . '">';
            } else {
                echo '<li>';
            }
            rd_showPortCategory();
            echo '      </li>';
            if ($filter_type == 'filter_type_3' || $filter_type == 'filter_type_4' || $filter_type == 'filter_type_5' || $filter_type == 'filter_type_6' || $filter_type == 'filter_type_7') {
                ?>
        		<li class="portfolio_sorts"><a><?php 
                echo __('Sort by', 'thefoxwp');
                ?>
</a><ul id="sorts"  class="button-group"><li data-sort-by=""><?php 
                echo __('default', 'thefoxwp');
                ?>
</li><li data-sort-by="date"><?php 
                echo __('date', 'thefoxwp');
                ?>
</li><li data-sort-by="name"><?php 
                echo __('name', 'thefoxwp');
                ?>
</li></ul></li>
			<?php 
            }
            echo '</ul></div>';
        }
    }
    if ($port_type !== 'port_type_7' && $port_type !== 'port_type_8' && $port_type !== 'port_type_9') {
        switch ($view_type) {
            case "1 column":
                $view_type_class = "columns1";
                break;
            case "2 columns":
                $view_type_class = "columns2";
                break;
            case "3 columns":
                $view_type_class = "columns3";
                break;
            case "4 columns":
                $view_type_class = "columns4";
                break;
            case "5 columns":
                $view_type_class = "columns5";
                break;
            case "6 columns":
                $view_type_class = "columns6";
                break;
        }
    } else {
        $view_type_class = "columns1";
    }
    //START PORTFOLIO
    echo '<div class="portfolio_block image-grid ' . $view_type_class . ' ' . $port_type . ' ' . $overlay . ' ' . $port_thumbnail . '" id="list">';
    if ($port_navigation !== 'loadmore_nav') {
        if (get_query_var('paged')) {
            $paged = get_query_var('paged');
        } elseif (get_query_var('page')) {
            $paged = get_query_var('page');
        } else {
            $paged = 1;
        }
        $args = array('posts_per_page' => $port_start, 'post_type' => "Portfolio", 'post_status' => 'publish', 'paged' => $paged);
        if ($category !== '' && $category !== "all") {
            $args['tax_query'] = array(array('taxonomy' => 'catportfolio', 'field' => 'slug', 'terms' => $category));
        }
        if ($tags !== '' && $tags !== "all") {
            $args['tax_query'] = array(array('taxonomy' => 'tagportfolio', 'field' => 'slug', 'terms' => $tags));
        }
        if ($category !== '' && $category !== "all" && $tags !== '' && $tags !== "all") {
            $args['tax_query'] = array(array('taxonomy' => 'catportfolio', 'field' => 'slug', 'terms' => $category), array('taxonomy' => 'tagportfolio', 'field' => 'slug', 'terms' => $tags));
        }
        $port_query = new WP_Query($args);
        global $more, $post;
        $more = 0;
        while ($port_query->have_posts()) {
            $port_query->the_post();
            if (!isset($echoallterm)) {
                $echoallterm = '';
                $showterm = '';
            }
            $new_term_list = get_the_terms(get_the_id(), "tagportfolio");
            if (is_array($new_term_list)) {
                foreach ($new_term_list as $term) {
                    $tempname = strtr($term->name, array(' ' => '-'));
                    $echoallterm .= $term->slug . " ";
                    $echoterm = $term->name;
                }
                foreach ($new_term_list as $term) {
                    $showterm .= strtolower($term->name) . " ";
                }
            }
            $i = 1;
            $pf = get_post_format();
            $project_url = get_post_meta($post->ID, 'rd_p_url', true);
            $project_thumb = get_post_meta($post->ID, 'rd_thumb', true);
            $ext_url = get_post_meta($post->ID, 'rd_ext_url', true);
            if ($ext_url !== '') {
                $linkToTheWork = $ext_url;
            } else {
                $linkToTheWork = get_permalink();
            }
            $target = "";
            $current = $port_query->query_vars['paged'];
            $maxpages = $port_query->max_num_pages;
            //Generating new items
            if ($port_thumbnail == 'thumbnail_type_5' || $port_thumbnail == 'thumbnail_type_6') {
                echo '<div data-category="' . $echoallterm . '" class="' . $echoallterm . ' element rd_' . $project_thumb . '">';
            } else {
                echo '<div data-category="' . $echoallterm . '" class="' . $echoallterm . ' element">';
            }
            if ($port_type == "port_type_6") {
                echo '
		<div class="port_item_details"><a href="' . $linkToTheWork . '"><h2>' . get_the_title() . '</h2></a><h3>' . $showterm . '</h3>
		<div class="item_details_info"><div class="item_details_date">' . get_the_date() . '</div>';
                if (function_exists('zilla_likes')) {
                    echo do_shortcode('[zilla_likes]');
                }
                echo '</div></div><div class="portfolio_sub_info"><div class="isotope_portfolio_name">' . get_the_title() . '</div><div class="isotope_portfolio_date">' . get_the_date('Y-m-d') . '</div></div>';
            }
            echo '
		<div class="filter_img">
		<div class="port_thumb_ctn">
		<div class="port_overlay"></div>
        <a ' . $target . ' href="' . $linkToTheWork . '" class="ico_link">';
            //Set thumbnail depending on portfolio design
            if ($port_type == 'port_type_7' || $port_type == 'port_type_8' || $port_type == 'port_type_9') {
                echo get_the_post_thumbnail(get_the_id(), "portfolio_classic");
            } elseif ($port_thumbnail == 'thumbnail_type_1') {
                echo get_the_post_thumbnail(get_the_id(), "portfolio_tn");
            } elseif ($port_thumbnail == 'thumbnail_type_2') {
                echo get_the_post_thumbnail(get_the_id(), "portfolio_squared");
            } elseif ($port_thumbnail == 'thumbnail_type_3') {
                echo get_the_post_thumbnail(get_the_id(), "portfolio_landscape");
            } elseif ($port_thumbnail == 'thumbnail_type_4') {
                echo get_the_post_thumbnail(get_the_id(), "portfolio_portrait");
            } elseif ($port_thumbnail == 'thumbnail_type_5') {
                if ($project_thumb == 'portfolio_small_squared' || $project_thumb == 'portfolio_squared') {
                    echo get_the_post_thumbnail(get_the_id(), 'portfolio_squared');
                }
                if ($project_thumb == 'portfolio_portrait') {
                    echo get_the_post_thumbnail(get_the_id(), 'portfolio_portrait');
                }
                if ($project_thumb == 'portfolio_landscape') {
                    echo get_the_post_thumbnail(get_the_id(), 'portfolio_landscape');
                }
            } elseif ($port_thumbnail == 'thumbnail_type_6') {
                if ($project_thumb == 'portfolio_small_squared' || $project_thumb == 'portfolio_squared') {
                    echo get_the_post_thumbnail(get_the_id(), array(960, 600));
                }
                if ($project_thumb == 'portfolio_portrait') {
                    echo get_the_post_thumbnail(get_the_id(), array(480, 600));
                }
                if ($project_thumb == 'portfolio_landscape') {
                    echo get_the_post_thumbnail(get_the_id(), array(960, 300));
                }
            } elseif ($port_thumbnail == 'thumbnail_type_7') {
                echo get_the_post_thumbnail(get_the_id(), 'full');
            }
            echo '
		</a><figcaption><div>
		<h2>' . get_the_title() . '</h2>
		<p>' . $showterm . '</p>
		</div>
		<a href="' . $linkToTheWork . '">View more</a>
		</figcaption>';
            if ('' != get_the_post_thumbnail()) {
                $url = wp_get_attachment_url(get_post_thumbnail_id($post->ID), 'full');
                echo '<a href="' . $url . '" class="prettyPhoto port_img_link">';
                echo "<span class='img_link'>";
                echo '';
                echo "</span></a><a href='" . $linkToTheWork . "' class='port_post_link'>";
                echo "<span class='post_link'><h2 class='fw_port_link'>" . get_the_title() . "</h2><h3 class='fw_port_tag'>" . $showterm . "</h3>";
                echo '';
                echo "</span></a>";
                echo "";
            }
            echo '<div class="portfolio_desc">
		<h2><a href="' . $linkToTheWork . '">' . get_the_title() . '</a></h2>
		<h3>' . $showterm . '</h3>
        </div>
		</div><!-- port_thumb_ctn END -->
		</div><!-- Filter img END -->';
            if ($port_type == "port_type_5" || $port_type == "port_type_7" || $port_type == "port_type_8" || $port_type == "port_type_9") {
                echo '
		<div class="port_item_details"><a href="' . $linkToTheWork . '"><h2>' . get_the_title() . '</h2></a><h3>' . $showterm . '</h3>
		<div class="item_details_info"><div class="item_details_date">' . get_the_date() . '</div>';
                if (function_exists('zilla_likes')) {
                    echo do_shortcode('[zilla_likes]');
                }
                echo '</div><div class="port_small_excerpt">';
                if ($port_type == "port_type_7" || $port_type == "port_type_8") {
                    echo rd_custom_excerpt('rd_port_excerpt', 'rd_port_more');
                }
                if ($port_type == "port_type_9") {
                    echo rd_custom_excerpt('rd_port_long_excerpt', 'rd_port_more');
                }
                echo '<div class="port_project_buttons">';
                if ($project_url !== '') {
                    echo '<a href="' . $project_url . '" target="_blank" class="view-portfolio-pp">' . __('Launch Project', 'thefoxwp') . '</a>';
                }
                echo '<a class="view-portfolio-item" href="' . $linkToTheWork . '">' . __('View More', 'thefoxwp') . '</a></div></div>
		</div>';
            }
            echo '<div class="portfolio_sub_info"><div class="isotope_portfolio_name">' . get_the_title() . '</div><div class="isotope_portfolio_date">' . get_the_date('Y-m-d') . '</div></div></div><!-- element END -->';
            #END Portfolio
            $i++;
            unset($echoallterm, $pf);
        }
    }
    echo '

                </div><!-- .portfolio_block -->

                <div class="rd_clear"><!-- ClearFix --></div>';
    if ($port_navigation == 'loadmore_nav') {
        $output = '';
        $output .= '<style>#random' . $portfolio_rand_class . '_port .btn_load_more{background:' . $button_bg . '; color:' . $button_title . '; border:1px solid ' . $button_border . ';}#random' . $portfolio_rand_class . '_port .refresh_icn:before{color:' . $button_title . ';}#random' . $portfolio_rand_class . '_port .btn_load_more:hover{background:' . $button_hover_bg . '; color:' . $button_hover_title . '; border:1px solid ' . $button_hover_bg . ';}#random' . $portfolio_rand_class . '_port .btn_load_more:hover .refresh_icn:before{color:' . $button_hover_title . ';}</style>';
        $output .= '<div class="load_more_cont"><a class="btn_load_more get_portfolio_works_btn" href="#"><span class="fa-plus refresh_icn"></span>' . __('Load More', 'thefoxwp') . '<span></span></a></div>';
        echo !empty($output) ? $output : '';
    }
    if ($port_navigation == 'classic_nav') {
        echo '<style>#random' . $portfolio_rand_class . '_port .navigation .pagination span,#random' . $portfolio_rand_class . '_port .navigation .pagination a{border:1px solid ' . $nav_border . '; color:' . $nav_color . '; background:' . $nav_bg . ';}#random' . $portfolio_rand_class . '_port .navigation .pagination .current,#random' . $portfolio_rand_class . '_port .navigation .pagination span:hover,#random' . $portfolio_rand_class . '_port .navigation .pagination a:hover{ color:' . $nav_hover_color . ' !important; background:' . $nav_hover_bg . '; border:1px solid ' . $nav_hover_bg . '; }#random' . $portfolio_rand_class . '_port .navigation{border-top:1px solid ' . $nav_border . ';}#random' . $portfolio_rand_class . '_port .pagination_current_position{color:' . $nav_color . ';}</style>';
        if (isset($maxpages)) {
            ?>
    
            
     <div class="navigation">

        <?php 
            kriesi_pagination($maxpages);
            echo "<span class='pagination_current_position'>" . __("Page", "rdesign") . ' ' . $current . "/" . $maxpages . "</span>";
            ?>

      </div>			
		<?php 
        }
    }
    echo '</div>';
    ?>
  <script>
  


jQuery.noConflict();
var $ = jQuery;
"use strict";
            <?php 
    if ($port_navigation == 'loadmore_nav') {
        ?>
 
			   /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!CONFIG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
                var html_template = "<?php 
        echo esc_js($port_type);
        ?>
";
				var thumbnail = "<?php 
        echo esc_js($port_thumbnail);
        ?>
";
                var now_open_works = 0;
                var first_load = true;

                /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!CONFIG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/



                function get_portfolio_works (this_obj) {

                    if(typeof(this_obj)=="undefined") {data_option_value="*";}

                    else {var data_option_value = this_obj.attr("data-option-value");}



                    if (first_load == true) {

                        works_per_load = <?php 
        echo esc_js($items_on_start);
        ?>
;

                        first_load = false;

                    } else {

                        works_per_load = <?php 
        echo esc_js($items_per_click);
        ?>
;

                    }



                    $.ajax({

                        type: "POST",

                        url: mixajaxurl,

                        data: "html_template="+html_template+"&now_open_works="+now_open_works+"&action=get_portfolio_works"+"&works_per_load="+works_per_load+"&thumbnail="+thumbnail+"&tags=<?php 
        echo esc_js($tags);
        ?>
&category=<?php 
        echo esc_js($category);
        ?>
",

                        success: function(result){

		                            if(result.length<1){

                                $("#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port .load_more_cont").hide("fast");

                            }




                            now_open_works = now_open_works + works_per_load;

                            var $newItems = $(result);
                            $("#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port .portfolio_block").isotope( 'insert', $newItems, function() {



                                $("#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port .portfolio_block").ready(function(){
                                    $("#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port .portfolio_block").isotope('layout');
                                    //Portfolio
                                    $('#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port .portfolio_content').each(function(){
                                    $(this).css('margin-top', Math.floor(-1*($(this).height()/2))+'px');
                                    });
	                                });

                               $("#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port .portfolio_block").isotope('layout');
							   
							   $(window).trigger('resize');


    							
    						
									
                            });
	$("#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port .optionset li a").each(function() {
									
								var filter_class = $(this).attr('data-option-value');
								 if ($('#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port').find(filter_class).length) { // implies *not* zero
								$(this).parent('li').show();
								 }else{
								$(this).parent('li').hide();
								 }
								
								
								
								});
								
								
                            $('a.prettyPhoto').prettyPhoto();
							
					$(window).trigger('resize');



							$(".refresh_icn").removeClass("fa-spin");

							$(".refresh_icn").removeClass("fa-refresh");
					
							$("#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port .portfolio_block").isotope('layout');

							$(".refresh_icn").addClass("fa-plus");
								


                        }   
						
						

                    });

                }



                $("#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port .get_portfolio_works_btn").click(function(){

					$(".refresh_icn").removeClass("fa-plus");

					$(".refresh_icn").addClass("fa-refresh");

                    $(".refresh_icn").addClass("fa-spin");

					get_portfolio_works();


					$(window).trigger('resize');							
					$("#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port .portfolio_block").isotope('layout');

					return false;

					

                });

               /* load at start */
                $(window).load(function(){
                    get_portfolio_works();
		
	
					$(window).trigger('resize');					
					$("#random<?php 
        echo esc_js($portfolio_rand_class);
        ?>
_port .portfolio_block").isotope('layout');
<?php 
    } else {
        ?>

 $(window).load(function(){
<?php 
    }
    ?>

	$("#random<?php 
    echo esc_js($portfolio_rand_class);
    ?>
_port .optionset li a").each(function() {
									
								var filter_class = $(this).attr('data-option-value');
								 if ($('#random<?php 
    echo esc_js($portfolio_rand_class);
    ?>
_port').find(filter_class).length){ // implies *not* zero
								$(this).parent('li').show();
								 }else{
								$(this).parent('li').hide();
								 }
								
								
								});
								
function watchport() {

$("#random<?php 
    echo esc_js($portfolio_rand_class);
    ?>
_port .portfolio_block").isotope('layout');
			<?php 
    if ($port_type == 'port_type_7' || $port_type == 'port_type_8' || $port_type == 'port_type_9') {
        ?>
		

			<?php 
    }
    ?>
		
					
}

setInterval(watchport, 100);


		   
                });
            </script>
  <?php 
    wp_reset_postdata();
    $output_string = ob_get_contents();
    ob_end_clean();
    return $output_string;
}
Esempio n. 8
0
function theme_gallery_shortcode($atts)
{
    global $themename;
    global $post;
    if (isset($_GET["atts"])) {
        //$_GET["action"]=="theme_" . $atts['shortcode_type'] . "_pagination")
        $atts = unserialize(stripslashes($_GET["atts"]));
    }
    extract(shortcode_atts(array("shortcode_type" => "", "header" => "", "animation" => 0, "order_by" => "title menu_order", "order" => "ASC", "type" => "list_with_details", "layout" => "gallery_4_columns", "featured_image_size" => "default", "hover_icons" => 1, "title_box" => 1, "details_page" => "", "display_method" => "dm_filters", "all_label" => "", "id" => "carousel", "autoplay" => 0, "pause_on_hover" => 1, "scroll" => 1, "effect" => "scroll", "easing" => "swing", "duration" => 500, "items_per_page" => 4, "ajax_pagination" => 1, "category" => "", "ids" => "", "order" => "DESC", "display_headers" => 1, "headers_type" => "h2", "display_social_icons" => 1, "images_loop" => 0, "lightbox_icon_color" => "blue_light", "top_margin" => "page_margin_top_section"), $atts));
    $featured_image_size = str_replace("mc_", "", $featured_image_size);
    if ($display_method == "dm_carousel") {
        if ($effect == "_fade") {
            $effect = "fade";
        }
        if (strpos('ease', $easing) !== false) {
            $newEasing = 'ease';
            if (strpos('InOut' . $easing) !== false) {
                $newEasing .= 'InOut';
            } else {
                if (strpos('In' . $easing) !== false) {
                    $newEasing .= 'In';
                } else {
                    if (strpos('Out' . $easing) !== false) {
                        $newEasing .= 'Out';
                    }
                }
            }
            $newEasing .= ucfirst(substr($easing, strlen($newEasing), strlen($easing) - strlen($newEasing)));
        } else {
            $newEasing = $easing;
        }
    }
    $ids = explode(",", $ids);
    if ($ids[0] == "-" || $ids[0] == "") {
        unset($ids[0]);
        $ids = array_values($ids);
    }
    $category = explode(",", $category);
    if ($category[0] == "-" || $category[0] == "") {
        unset($category[0]);
        $category = array_values($category);
    }
    $args = array('post__in' => $ids, 'post_type' => $shortcode_type == 'gallery' ? 'medicenter_gallery' : $shortcode_type, 'posts_per_page' => $display_method == "dm_pagination" ? $items_per_page : '-1', 'post_status' => 'publish', ($shortcode_type == 'gallery' ? 'medicenter_gallery' : $shortcode_type) . '_category' => implode(",", $category), 'orderby' => implode(" ", explode(",", $order_by)), 'order' => $order);
    if ($display_method == "dm_pagination") {
        if ($_GET["action"] == "theme_" . $shortcode_type . "_pagination") {
            $args['paged'] = (int) $_GET['paged'];
        } else {
            $args['paged'] = get_query_var('paged');
        }
    }
    query_posts($args);
    global $wp_query;
    $post_count = $wp_query->post_count;
    $output = "";
    if (have_posts()) {
        if ($display_method == "dm_pagination" && $_GET["action"] != "theme_" . $shortcode_type . "_pagination") {
            $output .= "<div class='theme_" . $shortcode_type . "_pagination'>";
        }
        //details
        if ($type == "list_with_details" || $type == "details") {
            $output .= '<ul class="gallery_item_details_list clearfix' . ($type == "details" ? ' not_hidden' : '') . ($top_margin != "none" ? ' ' . $top_margin : '') . '">';
            while (have_posts()) {
                the_post();
                $output .= '<li id="gallery-details-' . $post->post_name . '" class="gallery_item_details clearfix">
					<div class="columns no_width">
						<div class="column_left">';
                $attachment_ids = get_post_meta(get_the_ID(), $themename . "_attachment_ids", true);
                $images = get_post_meta(get_the_ID(), $themename . "_images", true);
                $images_count = count((array) $images);
                $arrayEmpty = true;
                for ($i = 0; $i < $images_count; $i++) {
                    if ((int) $attachment_ids) {
                        $arrayEmpty = false;
                    }
                }
                $output .= '<div class="gallery_box ' . ($hover_icons == 0 ? 'hover_icons_off' : '') . '">';
                if (!$arrayEmpty) {
                    $output .= '<ul class="image_carousel">';
                }
                $features_images_loop = get_post_meta(get_the_ID(), $themename . "_features_images_loop", true);
                if (has_post_thumbnail()) {
                    $image_title = get_post_meta(get_the_ID(), "image_title", true);
                    $video_url = get_post_meta(get_the_ID(), "video_url", true);
                    if ($video_url != "") {
                        $large_image_url = $video_url;
                    } else {
                        $attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), "large");
                        $large_image_url = $attachment_image[0];
                    }
                    $external_url = get_post_meta(get_the_ID(), "external_url", true);
                    $external_url_target = get_post_meta(get_the_ID(), "external_url_target", true);
                    $iframe_url = get_post_meta(get_the_ID(), "iframe_url", true);
                    if (!$arrayEmpty) {
                        $output .= '<li>';
                    }
                    $output .= '<span class="mc_preloader"></span>
									' . get_the_post_thumbnail(get_the_ID(), $themename . "-gallery-image", array("alt" => get_the_title(), "title" => "", "class" => "mc_preload")) . '
									<ul class="controls">
										<li>
											<a' . ($external_url != "" && $external_url_target == "new_window" ? ' target="_blank"' : '') . ' href="' . ($external_url == "" ? $iframe_url != "" ? $iframe_url : $large_image_url : $external_url) . '" class="fancybox' . ($video_url != "" ? '-video' : ($iframe_url != "" ? '-iframe' : ($external_url != "" ? '-url' : ''))) . ' open' . ($video_url != "" ? '_video' : ($iframe_url != "" ? '_iframe' : ($external_url != "" ? '_url' : ''))) . '_lightbox"' . ($features_images_loop == "yes" ? ' rel="featured_' . get_the_ID() . '"' : '') . ($image_title != "" ? ' title="' . esc_attr($image_title) . '"' : '') . ' style="background-image: url(\'' . get_template_directory_uri() . '/images/icons_media/' . $lightbox_icon_color . '/' . ($video_url != "" ? 'video' : ($iframe_url != "" || $external_url != "" ? 'url' : 'image')) . '.png\')"></a>
										</li>
									</ul>';
                    if (!$arrayEmpty) {
                        $output .= '</li>';
                    }
                }
                if (!$arrayEmpty) {
                    $images_titles = get_post_meta(get_the_ID(), $themename . "_images_titles", true);
                    $videos = get_post_meta(get_the_ID(), $themename . "_videos", true);
                    $iframes = get_post_meta(get_the_ID(), $themename . "_iframes", true);
                    $external_urls = get_post_meta(get_the_ID(), $themename . "_external_urls", true);
                    for ($i = 0; $i < $images_count; $i++) {
                        if ((int) $attachment_ids[$i]) {
                            $output .= '<li>' . ($i == 0 && !has_post_thumbnail() ? '<span class="mc_preloader"></span>' : '') . wp_get_attachment_image((int) $attachment_ids[$i], $themename . "-gallery-image", array("alt " => "")) . '
											<ul class="controls">
												<li>
													<a' . ($external_urls[$i] != "" ? ' target="_blank"' : '') . ' href="' . ($external_urls[$i] == "" ? $iframes[$i] != "" ? $iframes[$i] : ($videos[$i] != "" ? $videos[$i] : $images[$i]) : $external_urls[$i]) . '" title="' . esc_attr($images_titles[$i]) . '" class="fancybox' . ($videos[$i] != "" ? '-video' : ($iframes[$i] != "" ? '-iframe' : ($external_urls[$i] != "" ? '-url' : ''))) . ' open' . ($videos[$i] != "" ? '_video' : ($iframes[$i] != "" ? '_iframe' : ($external_urls[$i] != "" ? '_url' : ''))) . '_lightbox"' . ($external_urls[$i] == "" && $iframes[$i] == "" && $videos[$i] == "" ? $features_images_loop == "yes" ? ' rel="featured_' . get_the_ID() . '"' : '' : '') . ' style="background-image: url(\'' . get_template_directory_uri() . '/images/icons_media/' . $lightbox_icon_color . '/' . ($videos[$i] != "" ? 'video' : ($iframes[$i] != "" || $external_urls[$i] != "" ? 'url' : 'image')) . '.png\')"></a>
												</li>
											</ul>
										</li>';
                        }
                    }
                }
                if (!$arrayEmpty) {
                    $output .= '</ul>';
                }
                if ((int) $title_box) {
                    $output .= '<div class="description">
										<h3>' . get_the_title() . '</h3>
										<h5>' . get_post_meta(get_the_ID(), "subtitle", true) . '</h5>
									</div>';
                }
                $output .= '</div>';
                if ((int) $display_social_icons) {
                    $icon_type = get_post_meta(get_the_ID(), "social_icon_type", true);
                    $arrayEmpty = true;
                    for ($i = 0; $i < count($icon_type); $i++) {
                        if ($icon_type[$i] != "") {
                            $arrayEmpty = false;
                        }
                    }
                    if (!$arrayEmpty) {
                        $icon_url = get_post_meta(get_the_ID(), "social_icon_url", true);
                        $icon_target = get_post_meta(get_the_ID(), "social_icon_target", true);
                        $icon_color = get_post_meta(get_the_ID(), "social_icon_color", true);
                        $output .= '<ul class="social_icons clearfix">';
                        for ($i = 0; $i < count($icon_type); $i++) {
                            if ($icon_type[$i] != "") {
                                $output .= '<li><a class="social_icon" href="' . $icon_url[$i] . '"' . ($icon_target[$i] == 'new_window' ? ' target="_blank"' : '') . ' title="" style="background-image: url(\'' . get_template_directory_uri() . '/images/social_body/' . $icon_color[$i] . '/' . $icon_type[$i] . '.png\');">&nbsp;</a></li>';
                            }
                        }
                        $output .= '</ul>';
                    }
                }
                $output .= '</div>
					<div class="column_right">
						<div class="details_box">';
                if ((int) $display_headers) {
                    $output .= '<' . $headers_type . ' class="box_header' . ((int) $animation ? ' animation-slide' : '') . '"> ' . get_the_title() . '</' . $headers_type . '>';
                }
                $output .= wpb_js_remove_wpautop(apply_filters("the_content", get_the_content()));
                $timetable_page = get_post_meta(get_the_ID(), "timetable_page", true);
                if ($timetable_page != "") {
                    $output .= '<div class="item_footer clearfix">
								<a title="' . esc_attr(get_the_title($timetable_page)) . '" href="' . get_permalink($timetable_page) . '" class="more">
									' . get_the_title($timetable_page) . ' &rarr;
								</a>
							</div>';
                }
                if ($type != "details") {
                    $output .= '<ul class="controls page_margin_top">
									<li>
										<a href="#gallery-details-close" class="close"></a>
									</li>';
                    if ($post_count > 1) {
                        $output .= '
									<li>
										<a href="#" class="prev icon_small_arrow left_black"></a>
									</li>
									<li>
										<a href="#" class="next icon_small_arrow right_black"></a>
									</li>';
                    }
                    $output .= '
								</ul>';
                }
                $output .= '</div>
					</div>
				</div>';
            }
            $output .= '</ul>';
        }
        if ($type != "details") {
            if ($header != "" && $display_method != "dm_carousel") {
                $output .= '<h3 class="box_header' . ((int) $animation ? ' animation-slide' : '') . ($top_margin != "none" ? ' ' . $top_margin : '') . '">' . $header . '</h3>';
            }
            //categories filters
            if ($display_method == "dm_filters") {
                $categories_count = count($category);
                $output .= '<ul class="tabs_navigation isotope_filters page_margin_top clearfix">';
                if ($all_label != "") {
                    $output .= '<li>
							<a class="selected" href="#filter-*" title="' . ($all_label != '' ? esc_attr($all_label) : '') . '">' . ($all_label != '' ? esc_attr($all_label) : '') . '</a>
						</li>';
                }
                for ($i = 0; $i < $categories_count; $i++) {
                    $term = get_term_by('slug', $category[$i], ($shortcode_type == 'gallery' ? "medicenter_gallery" : $shortcode_type) . "_category");
                    $output .= '<li>
							<a href="#filter-' . trim($category[$i]) . '" title="' . esc_attr($term->name) . '">' . $term->name . '</a>
						</li>';
                }
                $output .= '</ul>';
            }
            //list
            if ($display_method == "dm_carousel") {
                $output .= '<div class="clearfix' . ($top_margin != "none" ? ' ' . $top_margin : '') . '">
				<div class="header_left">' . ($header != "" ? '<h3 class="box_header' . ((int) $animation ? ' animation-slide' : '') . '">' . $header . '</h3>' : '') . '</div>
				<div class="header_right"><a href="#" id="' . $id . '_prev" class="scrolling_list_control_left icon_small_arrow left_black"></a><a href="#" id="' . $id . '_next" class="scrolling_list_control_right icon_small_arrow right_black"></a></div></div>
				<ul class="mc_gallery ' . $layout . ' horizontal_carousel ' . $id . ' id-' . $id . ' autoplay-' . $autoplay . ' pause_on_hover-' . $pause_on_hover . ' scroll-' . $scroll . ' effect-' . $effect . ' easing-' . $newEasing . ' duration-' . $duration . '">';
            } else {
                $output .= '<ul class="mc_gallery ' . $layout . '">';
            }
            while (have_posts()) {
                the_post();
                $categories = array_filter((array) get_the_terms(get_the_ID(), ($shortcode_type == 'gallery' ? "medicenter_gallery" : $shortcode_type) . "_category"));
                $categories_count = count($categories);
                $categories_string = "";
                $i = 0;
                foreach ($categories as $category) {
                    $categories_string .= urldecode($category->slug) . ($i + 1 < $categories_count ? ' ' : '');
                    $i++;
                }
                if ($display_method == "dm_filters") {
                    $output .= '<li class="' . $categories_string . '" id="gallery-item-' . $post->post_name . '">
					<div class="gallery_box ' . ($hover_icons == 0 ? 'hover_icons_off' : '') . '">';
                } else {
                    $output .= '<li class="gallery_box ' . ($hover_icons == 0 ? 'hover_icons_off' : '') . '" id="gallery-item-' . $post->post_name . '">';
                }
                if (has_post_thumbnail()) {
                    $output .= ($display_method != "dm_carousel" ? '<span class="mc_preloader"></span>' : '') . get_the_post_thumbnail(get_the_ID(), $featured_image_size != "default" ? $featured_image_size : $themename . "-gallery-" . ($layout == "gallery_4_columns" ? "thumb-type-2" : ($layout == "gallery_3_columns" ? "thumb-type-1" : "image")), array("alt" => get_the_title(), "title" => "", "class" => "mc_preload"));
                }
                $output .= '
						<div class="description">
							<h3>' . get_the_title() . '</h3>
							<h5>' . get_post_meta(get_the_ID(), "subtitle", true) . '</h5>
						</div>';
                if (get_the_excerpt() != "") {
                    $output .= '<div class="item_details">' . apply_filters('the_excerpt', get_the_excerpt()) . '</div>';
                }
                if ((int) $display_social_icons) {
                    $icon_type = get_post_meta(get_the_ID(), "social_icon_type", true);
                    $arrayEmpty = true;
                    for ($i = 0; $i < count($icon_type); $i++) {
                        if ($icon_type[$i] != "") {
                            $arrayEmpty = false;
                        }
                    }
                    if (!$arrayEmpty) {
                        $icon_url = get_post_meta(get_the_ID(), "social_icon_url", true);
                        $icon_target = get_post_meta(get_the_ID(), "social_icon_target", true);
                        $icon_color = get_post_meta(get_the_ID(), "social_icon_color", true);
                        $output .= '<ul class="social_icons clearfix">';
                        for ($i = 0; $i < count($icon_type); $i++) {
                            if ($icon_type[$i] != "") {
                                $output .= '<li><a class="social_icon" href="' . $icon_url[$i] . '"' . (isset($icon_target[$i]) && $icon_target[$i] == 'new_window' ? ' target="_blank"' : '') . ' title="" style="background-image: url(\'' . get_template_directory_uri() . '/images/social_body/' . $icon_color[$i] . '/' . $icon_type[$i] . '.png\');">&nbsp;</a></li>';
                            }
                        }
                        $output .= '</ul>';
                    }
                }
                $output .= '
						<ul class="controls">
							<li>
								<a href="' . ($type == "list" && (int) $details_page ? get_permalink((int) $details_page) : '') . '#gallery-details-' . $post->post_name . '" class="open_details" style="background-image: url(\'' . get_template_directory_uri() . '/images/icons_media/' . $lightbox_icon_color . '/details.png\')"></a>
							</li>';
                if (has_post_thumbnail()) {
                    $output .= '<li>';
                    $image_title = get_post_meta(get_the_ID(), "image_title", true);
                    $video_url = get_post_meta(get_the_ID(), "video_url", true);
                    if ($video_url != "") {
                        $large_image_url = $video_url;
                    } else {
                        $attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), "large");
                        $large_image_url = $attachment_image[0];
                    }
                    $external_url = get_post_meta(get_the_ID(), "external_url", true);
                    $external_url_target = get_post_meta(get_the_ID(), "external_url_target", true);
                    $iframe_url = get_post_meta(get_the_ID(), "iframe_url", true);
                    $output .= '<a' . ($external_url != "" && $external_url_target == "new_window" ? ' target="_blank"' : '') . ' href="' . ($external_url == "" ? $iframe_url != "" ? $iframe_url : $large_image_url : $external_url) . '" class="fancybox' . ($video_url != "" ? '-video' : ($iframe_url != "" ? '-iframe' : ($external_url != "" ? '-url' : ''))) . ' open' . ($video_url != "" ? '_video' : ($iframe_url != "" ? '_iframe' : ($external_url != "" ? '_url' : ''))) . '_lightbox"' . ($external_url == "" && $iframe_url == "" && $video_url == "" ? ' rel="' . ((int) $images_loop ? 'mc_gallery' : 'gallery_item_' . get_the_ID()) . '"' : '') . ($image_title != "" ? ' title="' . esc_attr($image_title) . '"' : '') . ' style="background-image: url(\'' . get_template_directory_uri() . '/images/icons_media/' . $lightbox_icon_color . '/' . ($video_url != "" ? 'video' : ($iframe_url != "" || $external_url != "" ? 'url' : 'image')) . '.png\')"></a>
					</li>';
                }
                $output .= '</ul>';
                if ($display_method == "dm_filters") {
                    $output .= '</div>';
                }
                $output .= '</li>';
            }
            $output .= '</ul>';
            if ($display_method == "dm_pagination" && $_GET["action"] != "theme_" . $shortcode_type . "_pagination") {
                $output .= "</div>";
            }
            if (isset($_GET["action"]) && $_GET["action"] == "theme_" . $shortcode_type . "_pagination") {
                echo "theme_start" . $output . "theme_end";
                //Reset Query
                wp_reset_query();
                exit;
            } else {
                if ($display_method == "dm_pagination") {
                    require_once locate_template("pagination.php");
                    $output .= kriesi_pagination((int) $ajax_pagination ? true : false, '', (int) $ajax_pagination ? 100 : 2, false, false, 'theme_' . $shortcode_type . '_pagination', 'page_margin_top');
                    if ((int) $ajax_pagination) {
                        $output .= '<input type="hidden" name="theme_' . $shortcode_type . '_pagination" value="' . htmlentities(serialize($atts)) . '" />';
                    }
                }
            }
        }
    }
    //Reset Query
    wp_reset_query();
    return $output;
}
Esempio n. 9
0
"><?php 
    the_title();
    ?>
</a>
                                            </h3> </span>
                                    </div>
                             </li>
			<?php 
}
// end of the loop.
?>
                        </ul>
                        </div>
						<div id="page" style="float:left;">
						    <?php 
kriesi_pagination($wp_query->max_num_pages);
?>
						</div>
                    </div> 
                    <div class="bottom">
                        <div class="left">
                        </div>
                        <div class="center">
                        </div>
                        <div class="right">
                        </div>
                    </div>
                </div>
            </li>
        </ul>
					</div>
            echo get_post_meta($post->ID, 'pyre_custom_link_target', true);
            ?>
" class="button button_default small">View More</a>
                                                        <?php 
        } else {
            ?>
                                                            <a href="<?php 
            echo get_permalink($post->ID);
            ?>
" class="button button_default small">View More</a>
                                                        <?php 
        }
        ?>
											  	
                                        	</div>        
										</div>                                
									</div>
								   <!-- /Project Feed -->
                </div>                                
                <?php 
    }
}
?>
            </div>
        </div>    
		<?php 
kriesi_pagination($portf->max_num_pages, $range = 2);
?>
	</div>
<?php 
get_footer();
	<?php } ?>

				<?php if ($term_list = wp_get_post_tags($post->ID, array("fields" => "all"))): ?>
				<div class="tag-block">
					<small>Article tags:</small>
					<div class="article-tags">
					<?php foreach($term_list as $term): ?>
						<a href="<?php echo get_atoz_letter_link($term->slug); ?>"><?php echo ucfirst($term->name); ?></a>
					<?php endforeach; ?>
					</div>
				</div>	
				<?php endif; ?>
			</article>			

	<?php endwhile; // End the loop. Whew. ?>
	<?php kriesi_pagination(); ?>
	<?php wp_reset_postdata(); ?>
	<?php // Restore original query object
			$wp_query = null;
			$wp_query = $tmp_query;
	?>

		</div><!-- end of .left-column -->
		<div class="right-column">
	<?php

		$args = array(
		    'orderby'           => 'name', 
		    'order'             => 'ASC',
		    'hide_empty'        => false, 
		    'child_of'          => $current_category->parent
Esempio n. 12
0
        <?php 
get_template_part('templates/ajax_container');
?>
        
        <div class="blog_list_wrapper row indexlist">    
        <?php 
$paged = get_query_var('paged') ? get_query_var('paged') : 0;
$args = array('post_type' => 'post', 'paged' => $paged, 'status' => 'published');
$blog_selection = new WP_Query($args);
while ($blog_selection->have_posts()) {
    $blog_selection->the_post();
    get_template_part('templates/blog_unit');
}
wp_reset_query();
?>
        
           
        </div>
        <?php 
kriesi_pagination($blog_selection->max_num_pages, $range = 2);
?>
    
    </div><!-- end 8col container-->
    
<?php 
include locate_template('sidebar.php');
?>
</div>   

<?php 
get_footer();
            ?>
									</div>	
								</div> <!-- end row -->
							</li> <!-- end li -->
	      			
	      		<?php 
        }
        $ctr++;
    }
    ?>
	      
				</ul>
	
	      <br />
				<?php 
    kriesi_pagination($allsearch->max_num_pages);
    ?>
				
	  		<?php 
} else {
    ?>
	        <h2>Helaas, niets gevonden.</h2>
	        <br />
	        <p>Probeer hieronder een andere zoekopdracht...</p>
	        <?php 
    get_search_form();
    ?>
	      <?php 
}
?>
				
function staff_post_sc($atts, $content = null)
{
    extract(shortcode_atts(array('heading_size' => '', 'heading_color' => '', 'type' => 'type01', 'group' => '', 'heading_text' => '', 'posts_per_page' => '5', 'column' => 'blog_1_col', 'l_target' => '_blank', 'alt_column' => 'blog_1_col', 'bg_color' => '', 'alt_bg_color' => '', 'text_color' => '', 'heading_color' => '', 'hl_color' => '', 'border_color' => '', 'blog_navigation' => '', 'blog_click' => '4', 'filter' => '', 'filter_position' => '', 'nav_bg' => '', 'nav_color' => '', 'nav_border' => '', 'nav_hover_color' => '', 'nav_hover_bg' => '', 'button_bg' => '', 'button_title' => '', 'button_border' => '', 'button_hover_title' => '', 'button_hover_bg' => '', 'filter_text_color' => '', 'filter_background_color' => '', 'selected_filter_bg_color' => '', 'selected_filter_text_color' => '', 'filter_border_color' => ''), $atts));
    ob_start();
    $rp_id = RandomString(20);
    global $rd_data;
    if ($heading_color == '') {
        $heading_color = $rd_data['rd_content_heading_color'];
    }
    if ($text_color == '') {
        $text_color = $rd_data['rd_content_text_color'];
    }
    if ($hl_color == '') {
        $hl_color = $rd_data['rd_content_hl_color'];
    }
    if ($border_color == '') {
        $border_color = $rd_data['rd_content_border_color'];
    }
    if ($bg_color == '') {
        $bg_color = $rd_data['rd_content_bg_color'];
    }
    if ($button_bg == '') {
        $button_bg = $rd_data['rd_content_bg_color'];
    }
    if ($alt_bg_color == '') {
        $alt_bg_color = $rd_data['rd_content_grey_color'];
    }
    if ($button_title == '') {
        $button_title = $rd_data['rd_content_heading_color'];
    }
    if ($button_hover_title == '') {
        $button_hover_title = $rd_data['rd_content_bg_color'];
    }
    if ($button_border == '') {
        $button_border = $rd_data['rd_content_heading_color'];
    }
    if ($button_hover_bg == '') {
        $button_hover_bg = $rd_data['rd_content_heading_color'];
    }
    if ($nav_bg == '') {
        $nav_bg = $rd_data['rd_content_bg_color'];
    }
    if ($nav_color == '') {
        $nav_color = $rd_data['rd_content_text_color'];
    }
    if ($nav_border == '') {
        $nav_border = $rd_data['rd_content_border_color'];
    }
    if ($nav_hover_color == '') {
        $nav_hover_color = $rd_data['rd_content_bg_color'];
    }
    if ($nav_hover_bg == '') {
        $nav_hover_bg = $rd_data['rd_content_light_hover_color'];
    }
    if ($filter_background_color == '') {
        $filter_background_color = $rd_data['rd_content_bg_color'];
    }
    if ($filter_text_color == '') {
        $filter_text_color = $rd_data['rd_content_text_color'];
    }
    if ($selected_filter_bg_color == '') {
        $selected_filter_bg_color = $rd_data['rd_content_hl_color'];
    }
    if ($selected_filter_text_color == '') {
        $selected_filter_text_color = "#ffffff";
    }
    if ($filter_border_color == '') {
        $filter_border_color = $rd_data['rd_content_border_color'];
    }
    if ($type == 'type07' || $type == 'type09') {
        $column = $alt_column;
    }
    wp_enqueue_script('js_isotope', get_template_directory_uri() . '/js/jquery.isotope.min.js', array(), false, false);
    wp_enqueue_script('js_sorting_bp', get_template_directory_uri() . '/js/sorting_sp.js');
    wp_enqueue_script('js_refresh_bp', get_template_directory_uri() . '/js/refresh_bp.js');
    $items_on_start = $posts_per_page;
    $items_per_click = $blog_click;
    $view_type = $type;
    $output = '<style>';
    if ($type == 'type01') {
        $output .= '#rp_' . $rp_id . ' .rd_staff_p01 .member-info{color:' . $text_color . '; background:' . $bg_color . ';}#rp_' . $rp_id . ' .rd_staff_p01 .member-info h3 a{color:' . $heading_color . ';}#rp_' . $rp_id . ' .rd_staff_p01 .member-info h3 a:hover{color:' . $hl_color . ' !important;}#rp_' . $rp_id . ' .rd_staff_p01 .member-social-links a{color:' . $text_color . ' !important;}#rp_' . $rp_id . ' .rd_staff_p01 .member-social-links a:hover{color:' . $hl_color . ' !important;}#rp_' . $rp_id . ' .rd_staff_p01 .member_desc{color:' . $text_color . '; background:' . $bg_color . '; border-top:1px solid ' . $border_color . ';}#rp_' . $rp_id . ' .staff_post_ctn{ border:1px solid ' . $border_color . ';}';
    } elseif ($type == 'type02') {
        $output .= '#rp_' . $rp_id . ' .rd_staff_p02 .staff_post_ctn{border:1px solid ' . $border_color . ';}#rp_' . $rp_id . ' .rd_staff_p02 .member-info{color:' . $text_color . '; background:' . $bg_color . ';  border-top:1px solid ' . $border_color . ';}#rp_' . $rp_id . ' .rd_staff_p02 .member-info h3 a{color:' . $heading_color . ';}#rp_' . $rp_id . ' .rd_staff_p02 .staff_post_ctn:hover .position{color:' . $hl_color . ' !important;}#rp_' . $rp_id . ' .rd_staff_p02 .member-social-links a{color:' . $text_color . ' !important;}#rp_' . $rp_id . ' .rd_staff_p02 .member-social-links a:hover{color:' . $hl_color . ' !important;}#rp_' . $rp_id . ' .rd_staff_p02 .member_desc{ background:' . $bg_color . '; border-top:1px solid ' . $border_color . ';}#rp_' . $rp_id . ' .rd_staff_p02 .staff_post_ctn:hover .bw-wrapper a:before{background:' . $hl_color . ' } ';
    } elseif ($type == 'type03') {
        $output .= '#rp_' . $rp_id . ' .rd_staff_p03 .member-info{color:' . $text_color . ';}#rp_' . $rp_id . ' .rd_staff_p03 .member-info h3 a{color:' . $heading_color . ';}#rp_' . $rp_id . ' .rd_staff_p03 .member-info h3 a:hover{color:' . $hl_color . ';}#rp_' . $rp_id . ' .rd_staff_p03 .staff_post_ctn:hover .bw-wrapper a:before{background:' . $hl_color . ' }#rp_' . $rp_id . ' .rd_staff_p03 .staff_post_ctn:hover .bw-wrapper{border: 20px solid ' . $heading_color . ';}#rp_' . $rp_id . ' .rd_staff_p03 .member-photo{color:' . $border_color . ';}';
    } elseif ($type == 'type04') {
        $output .= '#rp_' . $rp_id . ' .rd_staff_p04 .member-info{color:' . $text_color . ';}#rp_' . $rp_id . ' .rd_staff_p04 .member-info h3 a{color:' . $heading_color . ';}#rp_' . $rp_id . ' .rd_staff_p04 .member-info h3 a:hover{color:' . $hl_color . ';}#rp_' . $rp_id . ' .rd_staff_p04 .member-photo{-moz-box-shadow: 0 0 0px 1px ' . $text_color . '; -webkit-box-shadow: 0 0 0px 1px ' . $text_color . '; box-shadow: 0 0 0px 1px ' . $text_color . ';} ';
    } elseif ($type == 'type05') {
        $output .= '#rp_' . $rp_id . ' .rd_staff_p05 .member-info{color:' . $text_color . '; background:' . $bg_color . ';}#rp_' . $rp_id . ' .rd_staff_p05 .member-info h3 a{color:' . $heading_color . ';}#rp_' . $rp_id . ' .rd_staff_p05 .member-info h3 a:hover{color:' . $hl_color . ' !important;}#rp_' . $rp_id . ' .rd_staff_p05 .member_desc{color:' . $text_color . '; background:' . $bg_color . '; border-top:1px solid ' . $border_color . ';}#rp_' . $rp_id . ' .rd_staff_p05 .staff_post_ctn{ border:1px solid ' . $border_color . ';}.rd_staff_p05 .staff_button{color:' . $heading_color . '; border-color:' . $heading_color . ';}.rd_staff_p05 .staff_button:hover{color:#ffffff; border-color:' . $hl_color . '; background:' . $hl_color . ';}#rp_' . $rp_id . ' .staff_post_ctn{ border:1px solid ' . $border_color . ';}';
    } elseif ($type == 'type06') {
        $output .= '#rp_' . $rp_id . ' .rd_staff_p06 .member-info{color:' . $text_color . ';}#rp_' . $rp_id . ' .rd_staff_p06 .member-info h3 a{color:' . $heading_color . ';}#rp_' . $rp_id . ' .rd_staff_p06 .member-info h3 a:hover{color:' . $hl_color . ';}#rp_' . $rp_id . ' .rd_staff_p06 .member-photo{background:' . $border_color . ';}';
    } elseif ($type == 'type08') {
        $output .= '#rp_' . $rp_id . ' .rd_staff_p08 .member-info{color:' . $text_color . ';}#rp_' . $rp_id . ' .rd_staff_p08 .member-info h3 a{color:' . $heading_color . ';}#rp_' . $rp_id . ' .rd_staff_p08 .member-info h3 a:hover,#rp_' . $rp_id . ' .rd_staff_p08 .member-info .position{color:' . $hl_color . ';}#rp_' . $rp_id . ' .rd_staff_p08 .position{border-bottom-color:' . $border_color . ';}';
    } elseif ($type == 'rstaff_01') {
        $output .= '#rp_' . $rp_id . '.rstaff_01 .recent_port_ctn{border-bottom:13px solid ' . $border_color . ';}#rp_' . $rp_id . '.' . $type . ' .recent_port_ctn:hover{border-bottom:13px solid ' . $hl_color . ';}#rp_' . $rp_id . '.' . $type . ' .member-info{background:' . $bg_color . '; color:' . $text_color . '; border:1px solid ' . $border_color . '; border-top:none;  border-bottom:none;}#rp_' . $rp_id . '.' . $type . ' .bw-wrapper{border:1px solid ' . $border_color . '; border-bottom:none;}#rp_' . $rp_id . '.' . $type . ' .member-info h3 a{color:' . $heading_color . ';}#rp_' . $rp_id . '.' . $type . ' .member-info h3 a:hover,#rp_' . $rp_id . '.' . $type . ' .member-social-links a:hover{color:' . $hl_color . ' !important;}#rp_' . $rp_id . '.' . $type . ' .staff_nav .staff_left,#rp_' . $rp_id . '.' . $type . ' .staff_nav .staff_right{background:' . $heading_color . ' ;}#rp_' . $rp_id . '.' . $type . ' .staff_nav .staff_left:hover,#rp_' . $rp_id . '.' . $type . ' .staff_nav .staff_right:hover{background:' . $hl_color . ';}';
    } elseif ($type == 'rstaff_02') {
        $output .= '#rp_' . $rp_id . '.rstaff_02{background:' . $bg_color . ';}#rp_' . $rp_id . '.rstaff_02 .team-member:nth-child(odd) .member-info{background:' . $bg_color . '; color:' . $text_color . ';}#rp_' . $rp_id . '.' . $type . ' .team-member:nth-child(even) .member-info{background:' . $alt_bg_color . '; color:' . $text_color . ';}#rp_' . $rp_id . '.' . $type . '  .team-member:nth-child(odd) .bw-wrapper:after{background:' . $bg_color . ';}#rp_' . $rp_id . '.' . $type . ' .team-member:nth-child(even) .bw-wrapper:after{background:' . $alt_bg_color . ';}#rp_' . $rp_id . '.' . $type . ' .member-info h3 a{color:' . $heading_color . ';}#rp_' . $rp_id . '.' . $type . ' .team-member:hover .bw-wrapper a:before{background:' . $hl_color . ';}
#rp_' . $rp_id . '.' . $type . ' .staff_nav .staff_left,#rp_' . $rp_id . '.' . $type . ' .staff_nav .staff_right{background:' . $heading_color . ' ;}#rp_' . $rp_id . '.' . $type . ' .staff_nav .staff_left:hover,#rp_' . $rp_id . '.' . $type . ' .staff_nav .staff_right:hover{background:' . $hl_color . ';}';
    } elseif ($type == 'rstaff_03') {
        $output .= '#rp_' . $rp_id . '.rstaff_03 .team-member:hover .bw-wrapper a:before{border:2px solid ' . $hl_color . '; transform: scale(1.03);}#rp_' . $rp_id . '.rstaff_03 .carousel_recent_post img{background:' . $bg_color . ';}#rp_' . $rp_id . '.' . $type . ' .member-info{ color:' . $text_color . ';}#rp_' . $rp_id . '.' . $type . ' .member-info h3 a{color:' . $heading_color . ';}#rp_' . $rp_id . '.' . $type . ' .member-info h3 a:hover{color:' . $hl_color . ';}#rp_' . $rp_id . '.' . $type . ' .staff_nav .staff_left,#rp_' . $rp_id . '.' . $type . ' .staff_nav .staff_right{background:' . $heading_color . ' ;}';
    }
    if ($blog_navigation !== '') {
        $output .= '#rp_' . $rp_id . ' .blog_load_more_cont .btn_load_more{background:' . $button_bg . '; color:' . $button_title . '; border:1px solid ' . $button_border . ';}#rp_' . $rp_id . ' .blog_load_more_cont .btn_load_more .refresh_icn:before{color:' . $button_title . ';}#rp_' . $rp_id . ' .blog_load_more_cont .btn_load_more:hover{background:' . $button_hover_bg . '; color:' . $button_hover_title . '; border:1px solid ' . $button_hover_bg . ';}#rp_' . $rp_id . ' .blog_load_more_cont .btn_load_more:hover .refresh_icn:before{color:' . $button_hover_title . ';}.navigation .pagination span,.navigation .pagination a{border:1px solid ' . $nav_border . '; color:' . $nav_color . '; background:' . $nav_bg . ';}.navigation .pagination .current,.navigation .pagination span:hover,.navigation .pagination a:hover{ color:' . $nav_hover_color . ' !important; background:' . $nav_hover_bg . '; border:1px solid ' . $nav_hover_bg . '; }.navigation{border-top:1px solid ' . $nav_border . ';}.pagination_current_position{color:' . $nav_color . ';}';
    }
    if ($filter !== '') {
        $output .= '#staff-position.filter_' . $rp_id . ' #options a {color:' . $filter_text_color . '; background:' . $filter_background_color . '; border:1px solid ' . $filter_border_color . ';}#staff-position.filter_' . $rp_id . ' #options .selected a{color:' . $selected_filter_text_color . '; background:' . $selected_filter_bg_color . '; border:1px solid ' . $selected_filter_bg_color . ';}';
    }
    $output .= '</style>';
    echo !empty($output) ? $output : '';
    ?>
<script>



jQuery.noConflict();
var $ = jQuery;
"use strict";

$(document).ready(function(){
<?php 
    if ($blog_navigation == 'loadmore_nav') {
        ?>

   /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!CONFIG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/

                var html_template = "<?php 
        echo esc_js($view_type);
        ?>
";
                var column = "<?php 
        echo esc_js($column);
        ?>
";
                var l_target = "<?php 
        echo esc_js($l_target);
        ?>
";
                var now_open_works = 0;
                var first_load = true;

   /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!CONFIG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/

                function get_staff_posts (this_obj) {

                    if(typeof(this_obj)=="undefined") {data_option_value="*";}
                    else {var data_option_value = this_obj.attr("data-option-value");}

                    if (first_load == true) {

                        works_per_load = <?php 
        echo esc_js($items_on_start);
        ?>
;
                        first_load = false;

                    } else {

                        works_per_load = <?php 
        echo esc_js($items_per_click);
        ?>
;

                    }

                    $.ajax({

                        type: "POST",
                        url: mixajaxurl,
                        data: "html_template="+html_template+"&now_open_works="+now_open_works+"&action=get_staff_posts"+"&works_per_load="+works_per_load+"&column="+column+"&l_target="+l_target+"&first_load="+first_load+"&group=<?php 
        echo esc_js($group);
        ?>
",
                        success: function(result){

	                            if(result.length<1){
                                $("#rp_<?php 
        echo esc_js($rp_id);
        ?>
 .blog_load_more_cont").hide("fast");
	                            }

                            now_open_works = now_open_works + works_per_load;
							first_load = false;
                            var $newItems = $(result);
                            $("#rp_<?php 
        echo esc_js($rp_id);
        ?>
").isotope( 'insert', $newItems, function() {
                            $("#rp_<?php 
        echo esc_js($rp_id);
        ?>
").ready(function(){
                            $("#rp_<?php 
        echo esc_js($rp_id);
        ?>
").isotope('layout');

                            //Blog
                            $('#rp_<?php 
        echo esc_js($rp_id);
        ?>
 .isotope-item').each(function(){
                            $(this).css('margin-top', Math.floor(-1*($(this).height()/2))+'px');
                            });
                            });


                               $("#rp_<?php 
        echo esc_js($rp_id);
        ?>
").isotope('layout');
							   
							   $(".filter_<?php 
        echo esc_js($rp_id);
        ?>
 .staffoptionset li a").each(function() {
									
								var filter_class = $(this).attr('data-option-value');
								 if ($('#rp_<?php 
        echo esc_js($rp_id);
        ?>
').find(filter_class).length) { // implies *not* zero
								$(this).parent('li').show();
								 }else{
								$(this).parent('li').hide();
								 }
								
								
								
								});
								
							   
							   $(window).trigger('resize');
							   
							});


$(".wpb_row:empty").remove();
$(".wpb_column:empty").remove();
$(".wpb_wrapper:empty").remove();
							
							$(".refresh_icn").removeClass("fa-spin");
							$(".refresh_icn").removeClass("fa-refresh");
							$(".refresh_icn").addClass("fa-plus");

                    }   

                    });
					
				}

                $("#rp_<?php 
        echo esc_js($rp_id);
        ?>
 .get_blog_posts_btn").click(function(){
				$(".refresh_icn").removeClass("fa-plus");
				$(".refresh_icn").addClass("fa-refresh");
                $(".refresh_icn").addClass("fa-spin");
                get_staff_posts();						
					$(".masonry_ctn").isotope('layout');

				return false;

                });


               /* load at start */

                $(window).load(function(){

                get_staff_posts();
				
				
				
<?php 
    } else {
        ?>

 $(window).load(function(){
							   $(".filter_<?php 
        echo esc_js($rp_id);
        ?>
 .staffoptionset li a").each(function() {
									
								var filter_class = $(this).attr('data-option-value');
								 if ($('#rp_<?php 
        echo esc_js($rp_id);
        ?>
').find(filter_class).length) { // implies *not* zero
								$(this).parent('li').show();
								 }else{
								$(this).parent('li').hide();
								 }
								});	
<?php 
    }
    ?>
				
						   
								
								
											
$('.masonry_ctn').isotope({
  // options
  itemSelector : '.staff_post',
  layoutMode : 'masonry'
});


});});


</script>
<?php 
    if ($filter !== '') {
        echo '
				<div id="staff-position" class="filter_' . $rp_id . ' ' . $filter_position . '">
				<ul class="splitter" id="options">';
        echo '<li>';
        rd_showstaffposition();
        echo '      </li>';
        echo '</ul></div>';
    }
    ?>

<div class="rd_staff_posts_ctn masonry_ctn <?php 
    echo esc_attr($column . ' ' . $type . '');
    if ($blog_navigation !== '') {
        echo ' staff_has_nav';
    }
    ?>
" id="rp_<?php 
    echo esc_attr($rp_id);
    ?>
">

<?php 
    if ($blog_navigation !== 'loadmore_nav') {
        if (get_query_var('paged')) {
            $paged = get_query_var('paged');
        } elseif (get_query_var('page')) {
            $paged = get_query_var('page');
        } else {
            $paged = 1;
        }
        $args = array('posts_per_page' => $posts_per_page, 'post_type' => "Staff", 'paged' => $paged);
        if ($group !== '' && $group !== "all") {
            $args['tax_query'] = array(array('taxonomy' => 'staffgroups', 'field' => 'slug', 'terms' => $group));
        }
        $staff_query = new WP_Query($args);
        global $more, $post;
        $more = 0;
        while ($staff_query->have_posts()) {
            $staff_query->the_post();
            $current = $staff_query->query_vars['paged'];
            $maxpages = $staff_query->max_num_pages;
            $linkToTheWork = get_permalink();
            $position = get_post_meta($post->ID, 'rd_position', true);
            $facebook = get_post_meta($post->ID, 'rd_facebook', true);
            $twitter = get_post_meta($post->ID, 'rd_twitter', true);
            $linkedin = get_post_meta($post->ID, 'rd_linkedin', true);
            $tumblr = get_post_meta($post->ID, 'rd_tumblr', true);
            $gplus = get_post_meta($post->ID, 'rd_gplus', true);
            $mail = get_post_meta($post->ID, 'rd_mail', true);
            $skype = get_post_meta($post->ID, 'rd_skype', true);
            $Pinterest = get_post_meta($post->ID, 'rd_pinterest', true);
            $vimeo = get_post_meta($post->ID, 'rd_vimeo', true);
            $youtube = get_post_meta($post->ID, 'rd_youtube', true);
            $dribbble = get_post_meta($post->ID, 'rd_dribbble', true);
            $deviantart = get_post_meta($post->ID, 'rd_deviantart', true);
            $reddit = get_post_meta($post->ID, 'rd_reddit', true);
            $behance = get_post_meta($post->ID, 'rd_behance', true);
            $digg = get_post_meta($post->ID, 'rd_digg', true);
            $flickr = get_post_meta($post->ID, 'rd_flickr', true);
            $instagram = get_post_meta($post->ID, 'rd_instagram', true);
            $desc = get_post_meta($post->ID, 'rd_small_desc', true);
            if (!isset($echoallterm)) {
                $echoallterm = '';
            }
            $new_term_list = get_the_terms(get_the_id(), "staffposition");
            if (is_array($new_term_list)) {
                foreach ($new_term_list as $term) {
                    $tempname = strtr($term->name, array(' ' => '-'));
                    $echoallterm .= "sf_" . strtolower($tempname) . " ";
                    $echoterm = $term->name;
                }
            }
            if ($type == "type01") {
                $icon = 0;
                ?>
<div data-category="<?php 
                echo esc_attr($echoallterm);
                ?>
" class="staff_post rd_staff_p01 ajax_post <?php 
                echo esc_attr($echoallterm);
                ?>
">

      
      <div class="staff_post_ctn">

  
         <div class="member-photo s_effect">

    <div class="bw-wrapper">       <a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_post_thumbnail('staff_tn', array('title' => ""));
                ?>
 
  </a>  
        
    </div>

  </div>

  <div class="member-info">

    <h3><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_title();
                ?>
</a></h3>

    <span class="position" ><?php 
                echo !empty($position) ? $position : '';
                ?>
</span>
 
  <div class="member-social-links">

        <?php 
                if ($facebook !== '' && $icon < 4) {
                    $icon++;
                    ?>
		<div id="facebook"><a  target="_blank" href="http://www.facebook.com/<?php 
                    echo esc_attr($facebook);
                    ?>
"  ><i class="fa fa-facebook"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($twitter !== '' && $icon < 4) {
                    $icon++;
                    ?>
		<div id="twitter"> <a  target="_blank" href="http://twitter.com/<?php 
                    echo esc_attr($twitter);
                    ?>
"  ><i class="fa fa-twitter"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($linkedin !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="lin"> <a  target="_blank" href="<?php 
                    echo esc_url($linkedin);
                    ?>
"  ><i class="fa fa-linkedin"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($tumblr !== '' && $icon < 4) {
                    $icon++;
                    ?>
		 <div id="tumblr"> <a  target="_blank" href="<?php 
                    echo esc_url($tumblr);
                    ?>
"  ><i class="fa fa-tumblr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($skype !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="skype">  <a  target="_blank" href="<?php 
                    echo esc_url($skype);
                    ?>
"  ><i class="fa fa-skype"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($Pinterest !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="Pinterest"> <a  target="_blank" href="<?php 
                    echo esc_url($Pinterest);
                    ?>
"  ><i class="fa fa-pinterest"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($vimeo !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="vimeo"> <a  target="_blank" href="<?php 
                    echo esc_url($vimeo);
                    ?>
"  ><i class="fa fa-vimeo-square"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($youtube !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="yt"> <a  target="_blank" href="<?php 
                    echo esc_url($youtube);
                    ?>
"  ><i class="fa fa-youtube"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($dribbble !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="dribbble"><a  target="_blank" href="<?php 
                    echo esc_url($dribbble);
                    ?>
"  ><i class="fa fa-dribbble"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($deviantart !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="da"> <a  target="_blank" href="<?php 
                    echo esc_url($deviantart);
                    ?>
"  ><i class="fa fa-deviantart"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($reddit !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="reddit"> <a  target="_blank" href="<?php 
                    echo esc_url($reddit);
                    ?>
"  ><i class="fa fa-reddit"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($behance !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="behance"> <a  target="_blank" href="<?php 
                    echo esc_url($behance);
                    ?>
"  ><i class="fa fa-behance"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($digg !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="digg"> <a  target="_blank" href="<?php 
                    echo esc_url($digg);
                    ?>
"  ><i class="fa fa-digg"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($flickr !== '' && $icon < 4) {
                    $icon++;
                    ?>
 <div id="flickr"> <a  target="_blank" href="<?php 
                    echo esc_url($flickr);
                    ?>
"  ><i class="fa fa-flickr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($instagram !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="instagram"> <a  target="_blank" href="<?php 
                    echo esc_url($instagram);
                    ?>
"  ><i class="fa fa-instagram"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($gplus !== '' && $icon < 4) {
                    $icon++;
                    ?>
<div id="gplus"> <a  target="_blank" href="<?php 
                    echo esc_url($gplus);
                    ?>
"  ><i class="fa fa-google-plus"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($mail !== '' && $icon < 4) {
                    $icon++;
                    ?>
        <div id="member_email"> <a  target="_blank" href="mailto:<?php 
                    echo esc_attr($mail);
                    ?>
"  ><i class="fa fa-envelope-o"></i></a></div>
        <?php 
                }
                ?>
    </div>
 
  </div>
    
    <div class="member_desc"><?php 
                $small_desc = substr($desc, 0, 200);
                $small_desc .= '...';
                echo !empty($small_desc) ? $small_desc : '';
                ?>
</div>


</div>
</div>


<?php 
            } elseif ($type == "type02") {
                ?>
<div data-category="<?php 
                echo esc_attr($echoallterm);
                ?>
" class="staff_post rd_staff_p02 ajax_post <?php 
                echo esc_attr($echoallterm);
                ?>
">

      
      <div class="staff_post_ctn">

  
         <div class="member-photo s_effect">

    <div class="bw-wrapper">       <a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_post_thumbnail('staff_tn', array('title' => ""));
                ?>
 
  </a>  
    
 
    </div>

  </div>

  <div class="member-info">

    <h3><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_title();
                ?>
</a></h3>

    <span class="position" ><?php 
                echo !empty($position) ? $position : '';
                ?>
</span>
  </div>
    
    <div class="member_desc">  <div class="member-social-links"> 

        <?php 
                if ($facebook !== '') {
                    ?>
		<div id="facebook"><a  target="_blank" href="http://www.facebook.com/<?php 
                    echo esc_attr($facebook);
                    ?>
"  ><i class="fa fa-facebook"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($twitter !== '') {
                    ?>
		<div id="twitter"> <a  target="_blank" href="http://twitter.com/<?php 
                    echo esc_attr($twitter);
                    ?>
"  ><i class="fa fa-twitter"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($linkedin !== '') {
                    ?>
<div id="lin"> <a  target="_blank" href="<?php 
                    echo esc_url($linkedin);
                    ?>
"  ><i class="fa fa-linkedin"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($tumblr !== '') {
                    ?>
		 <div id="tumblr"> <a  target="_blank" href="<?php 
                    echo esc_url($tumblr);
                    ?>
"  ><i class="fa fa-tumblr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($skype !== '') {
                    ?>
<div id="skype">  <a  target="_blank" href="<?php 
                    echo esc_url($skype);
                    ?>
"  ><i class="fa fa-skype"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($Pinterest !== '') {
                    ?>
<div id="Pinterest"> <a  target="_blank" href="<?php 
                    echo esc_url($Pinterest);
                    ?>
"  ><i class="fa fa-pinterest"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($vimeo !== '') {
                    ?>
<div id="vimeo"> <a  target="_blank" href="<?php 
                    echo esc_url($vimeo);
                    ?>
"  ><i class="fa fa-vimeo-square"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($youtube !== '') {
                    ?>
<div id="yt"> <a  target="_blank" href="<?php 
                    echo esc_url($youtube);
                    ?>
"  ><i class="fa fa-youtube"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($dribbble !== '') {
                    ?>
<div id="dribbble"><a  target="_blank" href="<?php 
                    echo esc_url($dribbble);
                    ?>
"  ><i class="fa fa-dribbble"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($deviantart !== '') {
                    ?>
<div id="da"> <a  target="_blank" href="<?php 
                    echo esc_url($deviantart);
                    ?>
"  ><i class="fa fa-deviantart"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($reddit !== '') {
                    ?>
<div id="reddit"> <a  target="_blank" href="<?php 
                    echo esc_url($reddit);
                    ?>
"  ><i class="fa fa-reddit"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($behance !== '') {
                    ?>
<div id="behance"> <a  target="_blank" href="<?php 
                    echo esc_url($behance);
                    ?>
"  ><i class="fa fa-behance"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($digg !== '') {
                    ?>
<div id="digg"> <a  target="_blank" href="<?php 
                    echo esc_url($digg);
                    ?>
"  ><i class="fa fa-digg"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($flickr !== '') {
                    ?>
 <div id="flickr"> <a  target="_blank" href="<?php 
                    echo esc_url($flickr);
                    ?>
"  ><i class="fa fa-flickr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($instagram !== '') {
                    ?>
<div id="instagram"> <a  target="_blank" href="<?php 
                    echo esc_url($instagram);
                    ?>
"  ><i class="fa fa-instagram"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($gplus !== '') {
                    ?>
<div id="gplus"> <a  target="_blank" href="<?php 
                    echo esc_url($gplus);
                    ?>
"  ><i class="fa fa-google-plus"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($mail !== '') {
                    ?>
        <div id="member_email"> <a  target="_blank" href="mailto:<?php 
                    echo esc_attr($mail);
                    ?>
"  ><i class="fa fa-envelope-o"></i></a></div>
        <?php 
                }
                ?>
    </div>
       </div>


</div>
</div>


<?php 
            } elseif ($type == "type03") {
                ?>
<div data-category="<?php 
                echo esc_attr($echoallterm);
                ?>
" class="staff_post rd_staff_p03 ajax_post <?php 
                echo esc_attr($echoallterm);
                ?>
">

      
      <div class="staff_post_ctn">

  
         <div class="member-photo s_effect">

    <div class="bw-wrapper">       <a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_post_thumbnail('staff_tn', array('title' => ""));
                ?>
 
  </a>  
    
 
    </div>

  </div>

  <div class="member-info">

    <h3><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_title();
                ?>
</a></h3>

    <span class="position" ><?php 
                echo !empty($position) ? $position : '';
                ?>
</span>
    
  </div>
    


</div>
</div>


<?php 
            } elseif ($type == "type04") {
                ?>
<div data-category="<?php 
                echo esc_attr($echoallterm);
                ?>
" class="staff_post rd_staff_p04 ajax_post <?php 
                echo esc_attr($echoallterm);
                ?>
">

      
      <div class="staff_post_ctn">

  
         <div class="member-photo s_effect">

    <div class="bw-wrapper">       <a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_post_thumbnail('staff_tn', array('title' => ""));
                ?>
 
  </a>  
    
 
    </div>

  </div>

  <div class="member-info">

    <h3><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_title();
                ?>
</a></h3>

    <span class="position" ><?php 
                echo !empty($position) ? $position : '';
                ?>
</span>
    <div class="member_desc"><?php 
                $small_desc = substr($desc, 0, 130);
                $small_desc .= '...';
                echo !empty($small_desc) ? $small_desc : '';
                ?>
</div>
  </div>
    


</div>
</div>


<?php 
            } elseif ($type == "type05") {
                ?>
<div data-category="<?php 
                echo esc_attr($echoallterm);
                ?>
" class="staff_post rd_staff_p05 ajax_post <?php 
                echo esc_attr($echoallterm);
                ?>
">

      
      <div class="staff_post_ctn">

  
         <div class="member-photo s_effect">

    <div class="bw-wrapper">       <a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_post_thumbnail('staff_tn', array('title' => ""));
                ?>
 
  </a>  
    
 
    </div>

  </div>

  <div class="member-info">

    <h3><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_title();
                ?>
</a></h3>

    <span class="position" ><?php 
                echo !empty($position) ? $position : '';
                ?>
</span>
    <div class="member_desc"><?php 
                $small_desc = substr($desc, 0, 120);
                $small_desc .= '...';
                echo !empty($small_desc) ? $small_desc : '';
                ?>
<a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
" class="staff_button"><?php 
                echo __('Read More', 'thefoxwp');
                ?>
</a></div>
  </div>
    


</div>
</div>


<?php 
            } elseif ($type == "type06") {
                $icon = 0;
                ?>
<div data-category="<?php 
                echo esc_attr($echoallterm);
                ?>
" class="staff_post rd_staff_p06 ajax_post <?php 
                echo esc_attr($echoallterm);
                ?>
">

      
      <div class="staff_post_ctn">

  
         <div class="member-photo s_effect">

    <div class="bw-wrapper">       <a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_post_thumbnail('staff_tn', array('title' => ""));
                ?>
 
  </a>  
    
 
    </div>

  </div>

  <div class="member-info">

    <h3><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_title();
                ?>
</a></h3>

    <span class="position" ><?php 
                echo !empty($position) ? $position : '';
                ?>
</span>
      <div class="member-social-links">

        <?php 
                if ($facebook !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="facebook"><a  target="_blank" href="http://www.facebook.com/<?php 
                    echo esc_attr($facebook);
                    ?>
"  ><i class="fa fa-facebook"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($twitter !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="twitter"> <a  target="_blank" href="http://twitter.com/<?php 
                    echo esc_attr($twitter);
                    ?>
"  ><i class="fa fa-twitter"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($linkedin !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="lin"> <a  target="_blank" href="<?php 
                    echo esc_url($linkedin);
                    ?>
"  ><i class="fa fa-linkedin"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($tumblr !== '' && $icon < 3) {
                    $icon++;
                    ?>
		 <div id="tumblr"> <a  target="_blank" href="<?php 
                    echo esc_url($tumblr);
                    ?>
"  ><i class="fa fa-tumblr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($skype !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="skype">  <a  target="_blank" href="<?php 
                    echo esc_url($skype);
                    ?>
"  ><i class="fa fa-skype"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($Pinterest !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="Pinterest"> <a  target="_blank" href="<?php 
                    echo esc_url($Pinterest);
                    ?>
"  ><i class="fa fa-pinterest"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($vimeo !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="vimeo"> <a  target="_blank" href="<?php 
                    echo esc_url($vimeo);
                    ?>
"  ><i class="fa fa-vimeo-square"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($youtube !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="yt"> <a  target="_blank" href="<?php 
                    echo esc_url($youtube);
                    ?>
"  ><i class="fa fa-youtube"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($dribbble !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="dribbble"><a  target="_blank" href="<?php 
                    echo esc_url($dribbble);
                    ?>
"  ><i class="fa fa-dribbble"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($deviantart !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="da"> <a  target="_blank" href="<?php 
                    echo esc_url($deviantart);
                    ?>
"  ><i class="fa fa-deviantart"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($reddit !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="reddit"> <a  target="_blank" href="<?php 
                    echo esc_url($reddit);
                    ?>
"  ><i class="fa fa-reddit"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($behance !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="behance"> <a  target="_blank" href="<?php 
                    echo esc_url($behance);
                    ?>
"  ><i class="fa fa-behance"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($digg !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="digg"> <a  target="_blank" href="<?php 
                    echo esc_url($digg);
                    ?>
"  ><i class="fa fa-digg"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($flickr !== '' && $icon < 3) {
                    $icon++;
                    ?>
 <div id="flickr"> <a  target="_blank" href="<?php 
                    echo esc_url($flickr);
                    ?>
"  ><i class="fa fa-flickr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($instagram !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="instagram"> <a  target="_blank" href="<?php 
                    echo esc_url($instagram);
                    ?>
"  ><i class="fa fa-instagram"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($gplus !== '' && $icon < 3) {
                    $icon++;
                    ?>
<div id="gplus"> <a  target="_blank" href="<?php 
                    echo esc_url($gplus);
                    ?>
"  ><i class="fa fa-google-plus"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($mail !== '' && $icon < 3) {
                    $icon++;
                    ?>
        <div id="member_email"> <a  target="_blank" href="mailto:<?php 
                    echo esc_attr($mail);
                    ?>
"  ><i class="fa fa-envelope-o"></i></a></div>
        <?php 
                }
                ?>
    </div>
    <div class="member_desc"><?php 
                $small_desc = substr($desc, 0, 160);
                $small_desc .= '...';
                echo !empty($small_desc) ? $small_desc : '';
                ?>
</div>
  </div>
    


</div>
</div>


<?php 
            } elseif ($type == "type07") {
                $icon = 0;
                ?>
<div data-category="<?php 
                echo esc_attr($echoallterm);
                ?>
" class="staff_post rd_staff_p07 ajax_post <?php 
                echo esc_attr($echoallterm);
                ?>
">
	<div class="staff_post_ctn">
		<div class="member-photo s_effect">
			<div class="bw-wrapper"><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_post_thumbnail('staff_tn', array('title' => ""));
                ?>
</a>
            </div>
      		
            <div class="member-social-links">
        <?php 
                if ($facebook !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="facebook"><a  target="_blank" href="http://www.facebook.com/<?php 
                    echo esc_attr($facebook);
                    ?>
"  ><i class="fa fa-facebook"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($twitter !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="twitter"> <a  target="_blank" href="http://twitter.com/<?php 
                    echo esc_attr($twitter);
                    ?>
"  ><i class="fa fa-twitter"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($linkedin !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="lin"> <a  target="_blank" href="<?php 
                    echo esc_url($linkedin);
                    ?>
"  ><i class="fa fa-linkedin"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($tumblr !== '' && $icon < 3) {
                    $icon++;
                    ?>
		 <div id="tumblr"> <a  target="_blank" href="<?php 
                    echo esc_url($tumblr);
                    ?>
"  ><i class="fa fa-tumblr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($skype !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="skype">  <a  target="_blank" href="<?php 
                    echo esc_url($skype);
                    ?>
"  ><i class="fa fa-skype"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($Pinterest !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="Pinterest"> <a  target="_blank" href="<?php 
                    echo esc_url($Pinterest);
                    ?>
"  ><i class="fa fa-pinterest"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($vimeo !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="vimeo"> <a  target="_blank" href="<?php 
                    echo esc_url($vimeo);
                    ?>
"  ><i class="fa fa-vimeo-square"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($youtube !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="yt"> <a  target="_blank" href="<?php 
                    echo esc_url($youtube);
                    ?>
"  ><i class="fa fa-youtube"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($dribbble !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="dribbble"><a  target="_blank" href="<?php 
                    echo esc_url($dribbble);
                    ?>
"  ><i class="fa fa-dribbble"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($deviantart !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="da"> <a  target="_blank" href="<?php 
                    echo esc_url($deviantart);
                    ?>
"  ><i class="fa fa-deviantart"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($reddit !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="reddit"> <a  target="_blank" href="<?php 
                    echo esc_url($reddit);
                    ?>
"  ><i class="fa fa-reddit"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($behance !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="behance"> <a  target="_blank" href="<?php 
                    echo esc_url($behance);
                    ?>
"  ><i class="fa fa-behance"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($digg !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="digg"> <a  target="_blank" href="<?php 
                    echo esc_url($digg);
                    ?>
"  ><i class="fa fa-digg"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($flickr !== '' && $icon < 3) {
                    $icon++;
                    ?>
		 <div id="flickr"> <a  target="_blank" href="<?php 
                    echo esc_url($flickr);
                    ?>
"  ><i class="fa fa-flickr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($instagram !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="instagram"> <a  target="_blank" href="<?php 
                    echo esc_url($instagram);
                    ?>
"  ><i class="fa fa-instagram"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($gplus !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="gplus"> <a  target="_blank" href="<?php 
                    echo esc_url($gplus);
                    ?>
"  ><i class="fa fa-google-plus"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($mail !== '' && $icon < 3) {
                    $icon++;
                    ?>
        <div id="member_email"> <a  target="_blank" href="mailto:<?php 
                    echo esc_attr($mail);
                    ?>
"  ><i class="fa fa-envelope-o"></i></a></div>
        <?php 
                }
                ?>
    		</div>

			<div class="member-info">
		    <h3><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_title();
                ?>
</a></h3>
		    <span class="position" ><?php 
                echo !empty($position) ? $position : '';
                ?>
</span>
			</div>


		</div>
    </div>
</div>

<?php 
            } elseif ($type == "type08") {
                $icon = 0;
                ?>
<div data-category="<?php 
                echo esc_attr($echoallterm);
                ?>
" class="staff_post rd_staff_p08 ajax_post <?php 
                echo esc_attr($echoallterm);
                ?>
">
	<div class="staff_post_ctn">
		<div class="member-photo s_effect">
			<div class="bw-wrapper"><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_post_thumbnail('staff_tn', array('title' => ""));
                ?>
</a>
            </div>
      		
            <div class="member-social-links">
        <?php 
                if ($facebook !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="facebook"><a  target="_blank" href="http://www.facebook.com/<?php 
                    echo esc_attr($facebook);
                    ?>
"  ><i class="fa fa-facebook"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($twitter !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="twitter"> <a  target="_blank" href="http://twitter.com/<?php 
                    echo esc_attr($twitter);
                    ?>
"  ><i class="fa fa-twitter"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($linkedin !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="lin"> <a  target="_blank" href="<?php 
                    echo esc_url($linkedin);
                    ?>
"  ><i class="fa fa-linkedin"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($tumblr !== '' && $icon < 3) {
                    $icon++;
                    ?>
		 <div id="tumblr"> <a  target="_blank" href="<?php 
                    echo esc_url($tumblr);
                    ?>
"  ><i class="fa fa-tumblr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($skype !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="skype">  <a  target="_blank" href="<?php 
                    echo esc_url($skype);
                    ?>
"  ><i class="fa fa-skype"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($Pinterest !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="Pinterest"> <a  target="_blank" href="<?php 
                    echo esc_url($Pinterest);
                    ?>
"  ><i class="fa fa-pinterest"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($vimeo !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="vimeo"> <a  target="_blank" href="<?php 
                    echo esc_url($vimeo);
                    ?>
"  ><i class="fa fa-vimeo-square"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($youtube !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="yt"> <a  target="_blank" href="<?php 
                    echo esc_url($youtube);
                    ?>
"  ><i class="fa fa-youtube"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($dribbble !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="dribbble"><a  target="_blank" href="<?php 
                    echo esc_url($dribbble);
                    ?>
"  ><i class="fa fa-dribbble"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($deviantart !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="da"> <a  target="_blank" href="<?php 
                    echo esc_url($deviantart);
                    ?>
"  ><i class="fa fa-deviantart"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($reddit !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="reddit"> <a  target="_blank" href="<?php 
                    echo esc_url($reddit);
                    ?>
"  ><i class="fa fa-reddit"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($behance !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="behance"> <a  target="_blank" href="<?php 
                    echo esc_url($behance);
                    ?>
"  ><i class="fa fa-behance"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($digg !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="digg"> <a  target="_blank" href="<?php 
                    echo esc_url($digg);
                    ?>
"  ><i class="fa fa-digg"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($flickr !== '' && $icon < 3) {
                    $icon++;
                    ?>
		 <div id="flickr"> <a  target="_blank" href="<?php 
                    echo esc_url($flickr);
                    ?>
"  ><i class="fa fa-flickr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($instagram !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="instagram"> <a  target="_blank" href="<?php 
                    echo esc_url($instagram);
                    ?>
"  ><i class="fa fa-instagram"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($gplus !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="gplus"> <a  target="_blank" href="<?php 
                    echo esc_url($gplus);
                    ?>
"  ><i class="fa fa-google-plus"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($mail !== '' && $icon < 3) {
                    $icon++;
                    ?>
        <div id="member_email"> <a  target="_blank" href="mailto:<?php 
                    echo esc_attr($mail);
                    ?>
"  ><i class="fa fa-envelope-o"></i></a></div>
        <?php 
                }
                ?>
    		</div>
			
            </div>
			<div class="member-info">   
		    <h3><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_title();
                ?>
</a></h3>
		    <span class="position" ><?php 
                echo !empty($position) ? $position : '';
                ?>
</span>
            <div class="member_desc"><?php 
                $small_desc = substr($desc, 0, 160);
                $small_desc .= '...';
                echo !empty($small_desc) ? $small_desc : '';
                ?>
</div>
			</div>


    </div>
</div>


<?php 
            } elseif ($type == "type09") {
                $icon = 0;
                ?>
<div data-category="<?php 
                echo esc_attr($echoallterm);
                ?>
" class="staff_post rd_staff_p09 ajax_post <?php 
                echo esc_attr($echoallterm);
                ?>
">
	<div class="staff_post_ctn">
		<div class="member-photo s_effect">
			<div class="bw-wrapper"><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_post_thumbnail('staff_tn', array('title' => ""));
                ?>
</a>
            </div>
      		
            <div class="member-social-links">
        <?php 
                if ($facebook !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="facebook"><a  target="_blank" href="http://www.facebook.com/<?php 
                    echo esc_attr($facebook);
                    ?>
"  ><i class="fa fa-facebook"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($twitter !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="twitter"> <a  target="_blank" href="http://twitter.com/<?php 
                    echo esc_attr($twitter);
                    ?>
"  ><i class="fa fa-twitter"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($linkedin !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="lin"> <a  target="_blank" href="<?php 
                    echo esc_url($linkedin);
                    ?>
"  ><i class="fa fa-linkedin"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($tumblr !== '' && $icon < 3) {
                    $icon++;
                    ?>
		 <div id="tumblr"> <a  target="_blank" href="<?php 
                    echo esc_url($tumblr);
                    ?>
"  ><i class="fa fa-tumblr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($skype !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="skype">  <a  target="_blank" href="<?php 
                    echo esc_url($skype);
                    ?>
"  ><i class="fa fa-skype"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($Pinterest !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="Pinterest"> <a  target="_blank" href="<?php 
                    echo esc_url($Pinterest);
                    ?>
"  ><i class="fa fa-pinterest"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($vimeo !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="vimeo"> <a  target="_blank" href="<?php 
                    echo esc_url($vimeo);
                    ?>
"  ><i class="fa fa-vimeo-square"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($youtube !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="yt"> <a  target="_blank" href="<?php 
                    echo esc_url($youtube);
                    ?>
"  ><i class="fa fa-youtube"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($dribbble !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="dribbble"><a  target="_blank" href="<?php 
                    echo esc_url($dribbble);
                    ?>
"  ><i class="fa fa-dribbble"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($deviantart !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="da"> <a  target="_blank" href="<?php 
                    echo esc_url($deviantart);
                    ?>
"  ><i class="fa fa-deviantart"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($reddit !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="reddit"> <a  target="_blank" href="<?php 
                    echo esc_url($reddit);
                    ?>
"  ><i class="fa fa-reddit"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($behance !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="behance"> <a  target="_blank" href="<?php 
                    echo esc_url($behance);
                    ?>
"  ><i class="fa fa-behance"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($digg !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="digg"> <a  target="_blank" href="<?php 
                    echo esc_url($digg);
                    ?>
"  ><i class="fa fa-digg"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($flickr !== '' && $icon < 3) {
                    $icon++;
                    ?>
		 <div id="flickr"> <a  target="_blank" href="<?php 
                    echo esc_url($flickr);
                    ?>
"  ><i class="fa fa-flickr"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($instagram !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="instagram"> <a  target="_blank" href="<?php 
                    echo esc_url($instagram);
                    ?>
"  ><i class="fa fa-instagram"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($gplus !== '' && $icon < 3) {
                    $icon++;
                    ?>
		<div id="gplus"> <a  target="_blank" href="<?php 
                    echo esc_url($gplus);
                    ?>
"  ><i class="fa fa-google-plus"></i></a></div>
        <?php 
                }
                ?>
        <?php 
                if ($mail !== '' && $icon < 3) {
                    $icon++;
                    ?>
        <div id="member_email"> <a  target="_blank" href="mailto:<?php 
                    echo esc_attr($mail);
                    ?>
"  ><i class="fa fa-envelope-o"></i></a></div>
        <?php 
                }
                ?>
    		</div>

			<div class="member-info">
		    <h3><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_title();
                ?>
</a></h3>
		    <span class="position" ><?php 
                echo !empty($position) ? $position : '';
                ?>
</span>
			</div>


		</div>
    </div>
</div>

<?php 
            }
            if ($type !== "type01" && $type !== "type02" && $type !== "type03" && $type !== "type04" && $type !== "type05" && $type !== "type06" && $type !== "type07" && $type !== "type08" && $type !== "type09") {
                ?>
<div class="carousel_recent_post team-member staff_post ajax_post <?php 
                echo esc_attr($echoallterm);
                ?>
">
    <div class="recent_port_ctn clearfix">

  
         <div class="member-photo s_effect">

    <div class="bw-wrapper">       <a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                if ($type == 'rstaff_02') {
                    echo the_post_thumbnail(array(586, 440), array('title' => ""));
                } else {
                    echo the_post_thumbnail('staff_tn', array('title' => ""));
                }
                ?>
 
  </a> <?php 
                if ($type == 'rstaff_01') {
                    ?>
   
    
   <div class="member-social-links">

        <?php 
                    if ($facebook !== '') {
                        ?>
		<div id="facebook"><a  target="_blank" href="http://www.facebook.com/<?php 
                        echo esc_attr($facebook);
                        ?>
"  ><i class="fa fa-facebook"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($twitter !== '') {
                        ?>
		<div id="twitter"> <a  target="_blank" href="http://twitter.com/<?php 
                        echo esc_attr($twitter);
                        ?>
"  ><i class="fa fa-twitter"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($linkedin !== '') {
                        ?>
<div id="lin"> <a  target="_blank" href="<?php 
                        echo esc_url($linkedin);
                        ?>
"  ><i class="fa fa-linkedin"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($tumblr !== '') {
                        ?>
		 <div id="tumblr"> <a  target="_blank" href="<?php 
                        echo esc_url($tumblr);
                        ?>
"  ><i class="fa fa-tumblr"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($skype !== '') {
                        ?>
<div id="skype">  <a  target="_blank" href="<?php 
                        echo esc_url($skype);
                        ?>
"  ><i class="fa fa-skype"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($Pinterest !== '') {
                        ?>
<div id="Pinterest"> <a  target="_blank" href="<?php 
                        echo esc_url($Pinterest);
                        ?>
"  ><i class="fa fa-pinterest"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($vimeo !== '') {
                        ?>
<div id="vimeo"> <a  target="_blank" href="<?php 
                        echo esc_url($vimeo);
                        ?>
"  ><i class="fa fa-vimeo-square"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($youtube !== '') {
                        ?>
<div id="yt"> <a  target="_blank" href="<?php 
                        echo esc_url($youtube);
                        ?>
"  ><i class="fa fa-youtube"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($dribbble !== '') {
                        ?>
<div id="dribbble"><a  target="_blank" href="<?php 
                        echo esc_url($dribbble);
                        ?>
"  ><i class="fa fa-dribbble"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($deviantart !== '') {
                        ?>
<div id="da"> <a  target="_blank" href="<?php 
                        echo esc_url($deviantart);
                        ?>
"  ><i class="fa fa-deviantart"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($reddit !== '') {
                        ?>
<div id="reddit"> <a  target="_blank" href="<?php 
                        echo esc_url($reddit);
                        ?>
"  ><i class="fa fa-reddit"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($behance !== '') {
                        ?>
<div id="behance"> <a  target="_blank" href="<?php 
                        echo esc_url($behance);
                        ?>
"  ><i class="fa fa-behance"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($digg !== '') {
                        ?>
<div id="digg"> <a  target="_blank" href="<?php 
                        echo esc_url($digg);
                        ?>
"  ><i class="fa fa-digg"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($flickr !== '') {
                        ?>
 <div id="flickr"> <a  target="_blank" href="<?php 
                        echo esc_url($flickr);
                        ?>
"  ><i class="fa fa-flickr"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($instagram !== '') {
                        ?>
<div id="instagram"> <a  target="_blank" href="<?php 
                        echo esc_url($instagram);
                        ?>
"  ><i class="fa fa-instagram"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($gplus !== '') {
                        ?>
<div id="gplus"> <a  target="_blank" href="<?php 
                        echo esc_url($gplus);
                        ?>
"  ><i class="fa fa-google-plus"></i></a></div>
        <?php 
                    }
                    ?>
        <?php 
                    if ($mail !== '') {
                        ?>
        <div id="member_email"> <a  target="_blank" href="mailto:<?php 
                        echo esc_attr($mail);
                        ?>
"  ><i class="fa fa-envelope-o"></i></a></div>
        <?php 
                    }
                    ?>
    </div>
<?php 
                }
                ?>
    
    
    </div>

  </div>

  <div class="member-info">

    <h3><a href="<?php 
                echo the_permalink();
                ?>
" target="<?php 
                echo esc_attr($l_target);
                ?>
"><?php 
                echo the_title();
                ?>
</a></h3>

    <span class="position" ><?php 
                echo !empty($position) ? $position : '';
                ?>
</span>
   

  </div>
</div>


</div>


<?php 
            }
            unset($echoallterm, $pf);
        }
    }
    if ($blog_navigation == 'loadmore_nav') {
        ?>
<div class="blog_load_more_cont"><a class="btn_load_more get_blog_posts_btn" href="#"><span class="fa-plus refresh_icn"></span><?php 
        echo __('Load More', 'thefoxwp');
        ?>
</a></div><div class="clear"><!-- ClearFix --></div>
<?php 
    }
    ?>



</div>
<?php 
    if ($blog_navigation == 'classic_nav') {
        ?>

<!-- .navigation -->

     <div class="navigation clearfix">

        <?php 
        kriesi_pagination($maxpages);
        echo "<span class='pagination_current_position'>" . __("Page", "rdesign") . ' ' . $current . "/" . $maxpages . "</span>";
        ?>

      </div>

<!-- .navigation END -->

<?php 
    }
    $output_string = ob_get_contents();
    ob_end_clean();
    return $output_string;
}
function blog_sc($atts, $content = null)
{
    extract(shortcode_atts(array('heading_size' => '', 'heading_color' => '', 'type' => 'type1', 'heading_text' => '', 'posts_per_page' => '5', 'category' => 'all', 'column' => 'blog_4_col', 'more_option' => 'cutted', 'tn_size' => '', 'blog_bg_color' => '', 'blog_text_color' => '', 'blog_heading_color' => '', 'blog_hl_color' => '', 'blog_hover_color' => '', 'blog_border_color' => '', 'blog_timelinedb_color' => '', 'blog_v_color' => '', 'blog_v_alt_color' => '', 'blog_navigation' => 'loadmore_nav', 'blog_click' => '4', 'nav_bg' => '', 'nav_color' => '', 'nav_border' => '', 'nav_hover_color' => '', 'nav_hover_bg' => '', 'button_bg' => '', 'button_title' => '', 'button_border' => '', 'button_hover_title' => '', 'button_hover_bg' => ''), $atts));
    ob_start();
    $id = RandomString(20);
    global $rd_data;
    if ($blog_heading_color == '') {
        $blog_heading_color = $rd_data['rd_content_heading_color'];
    }
    if ($blog_text_color == '') {
        $blog_text_color = $rd_data['rd_content_text_color'];
    }
    if ($blog_hl_color == '') {
        $blog_hl_color = $rd_data['rd_content_hl_color'];
    }
    if ($blog_hover_color == '') {
        $blog_hover_color = $rd_data['rd_content_hover_color'];
    }
    if ($blog_v_color == '') {
        $blog_v_color = $rd_data['rd_content_hl_color'];
    }
    if ($blog_v_alt_color == '') {
        $blog_v_alt_color = $rd_data['rd_content_hover_color'];
    }
    if ($blog_border_color == '') {
        $blog_border_color = $rd_data['rd_content_border_color'];
    }
    if ($blog_timelinedb_color == '') {
        $blog_timelinedb_color = $rd_data['rd_content_bg_color'];
    }
    if ($blog_bg_color == '') {
        $blog_bg_color = $rd_data['rd_content_bg_color'];
    }
    if ($button_bg == '') {
        $button_bg = $rd_data['rd_content_bg_color'];
    }
    if ($button_title == '') {
        $button_title = $rd_data['rd_content_heading_color'];
    }
    if ($button_hover_title == '') {
        $button_hover_title = $rd_data['rd_content_bg_color'];
    }
    if ($button_border == '') {
        $button_border = $rd_data['rd_content_heading_color'];
    }
    if ($button_hover_bg == '') {
        $button_hover_bg = $rd_data['rd_content_heading_color'];
    }
    if ($nav_bg == '') {
        $nav_bg = $rd_data['rd_content_bg_color'];
    }
    if ($nav_color == '') {
        $nav_color = $rd_data['rd_content_text_color'];
    }
    if ($nav_border == '') {
        $nav_border = $rd_data['rd_content_border_color'];
    }
    if ($nav_hover_color == '') {
        $nav_hover_color = $rd_data['rd_content_bg_color'];
    }
    if ($nav_hover_bg == '') {
        $nav_hover_bg = $rd_data['rd_content_light_hover_color'];
    }
    if ($type == 'type2') {
        $blog_navigation = 'loadmore_nav';
    }
    $custom_blog_css = '<style>';
    //normal blog
    $custom_blog_css .= '.post-title h2 a{color:' . $blog_heading_color . ';}.post-title h2 a:hover{color:' . $blog_hover_color . ';}';
    $custom_blog_css .= '.post,.post .post-info a{color:' . $blog_text_color . ';}';
    $custom_blog_css .= '.mejs-container .mejs-controls,.audio_ctn{background:' . $blog_text_color . ' !important;}';
    $custom_blog_css .= '.post_quote_text,.post_quote_author{background:' . $blog_hover_color . '; color:' . $blog_bg_color . ';}';
    $custom_blog_css .= '.post a{color:' . $blog_hl_color . ';}.post a:hover,.post .post-info a:hover{color:' . $blog_hover_color . ';}';
    $custom_blog_css .= '.post .more-link{color:' . $blog_heading_color . '; border:1px solid ' . $blog_heading_color . ';}.post .more-link:hover{background:' . $blog_heading_color . '; color:' . $blog_bg_color . ';}';
    $custom_blog_css .= '.mejs-controls .mejs-time-rail .mejs-time-current{background:' . $blog_heading_color . ' !important;}';
    $custom_blog_css .= '.post .post-info{border-bottom:1px solid ' . $blog_border_color . ';}';
    $custom_blog_css .= '.blog_load_more_cont .btn_load_more{background:' . $button_bg . '; color:' . $button_title . '; border:1px solid ' . $button_border . ';}.blog_load_more_cont .btn_load_more .refresh_icn:before{color:' . $button_title . ';}.blog_load_more_cont .btn_load_more:hover{background:' . $button_hover_bg . '; color:' . $button_hover_title . '; border:1px solid ' . $button_hover_bg . ';}.blog_load_more_cont .btn_load_more:hover .refresh_icn:before{color:' . $button_hover_title . ';}';
    $custom_blog_css .= '.navigation .pagination span,.navigation .pagination a{border:1px solid ' . $nav_border . '; color:' . $nav_color . '; background:' . $nav_bg . ';}.navigation .pagination .current,.navigation .pagination span:hover,.navigation .pagination a:hover{ color:' . $nav_hover_color . ' !important; background:' . $nav_hover_bg . '; border:1px solid ' . $nav_hover_bg . '; }.navigation{border-top:1px solid ' . $nav_border . ';}.pagination_current_position{color:' . $nav_color . ';}';
    $custom_blog_css .= '.standard_trend_post_wrapper .post-title h2:after{color:' . $blog_text_color . ';}';
    $custom_blog_css .= '.standard_trend_post_wrapper .post-info,.standard_trend_post_wrapper .post-info a{color:' . $blog_hl_color . ';}';
    $custom_blog_css .= '.standard_trend_post_wrapper .more{background:' . $blog_hover_color . '; color:#fff;}.standard_trend_post_wrapper .more:hover{background:' . $blog_hl_color . '; color:#fff;}';
    $custom_blog_css .= '.standard_trend_post_wrapper .post-info-bottom{border-top:1px solid ' . $blog_border_color . '; color:' . $blog_text_color . ';}.standard_trend_post_wrapper .post-info-bottom a{color:' . $blog_text_color . ';}';
    //masonry grid
    $custom_blog_css .= '.masonry_post_wrapper,.masonry_post_wrapper .post-info a,.masonry_post_wrapper .post-bottom-info a{color:' . $blog_text_color . ';}';
    $custom_blog_css .= '.masonry_post_wrapper a{color:' . $blog_hl_color . ';}.masonry_post_wrapper a:hover,.masonry_post_wrapper .post-info a:hover,.masonry_post_wrapper .post-bottom-info a:hover{color:' . $blog_hover_color . ';}';
    $custom_blog_css .= '.masonry_post_wrapper .more-link{color:' . $blog_heading_color . '; border:1px solid ' . $blog_heading_color . ';}.masonry_post_wrapper .more-link:hover{background:' . $blog_heading_color . '; color:' . $blog_bg_color . ';}';
    $custom_blog_css .= '.masonry_post_wrapper{background:' . $blog_bg_color . '; border:1px solid ' . $blog_border_color . ';}';
    $custom_blog_css .= '.masonry_post_wrapper .post-info{border-bottom:1px solid ' . $blog_border_color . ';}';
    $custom_blog_css .= '.masonry_post_wrapper .post-bottom-info{border-top:1px solid ' . $blog_border_color . ';}';
    $custom_blog_css .= '.masonry_post_wrapper .flex-direction-nav li a{color:' . $blog_heading_color . '; background:' . $blog_bg_color . ';}';
    $custom_blog_css .= '.post_masonry .more-link,.post_timeline .more{color:' . $blog_bg_color . '; border:1px solid ' . $blog_heading_color . '; background:' . $blog_heading_color . '}.post_masonry .more-link:hover{background:' . $blog_hover_color . '; color:' . $blog_bg_color . '; border:1px solid ' . $blog_hover_color . ';}';
    $custom_blog_css .= '.grid_blog_post .more{color:' . $blog_heading_color . '; border:1px solid ' . $blog_heading_color . '; background:' . $blog_bg_color . '}.grid_blog_post .more:hover{background:' . $blog_heading_color . '; color:' . $blog_bg_color . '; border:1px solid ' . $blog_heading_color . ';}';
    $custom_blog_css .= '.post.multi_author_post .more-link{color:' . $blog_heading_color . ';  background:none; border:none;}.post.multi_author_post .more-link:hover{color:' . $blog_hover_color . '; background:none; border:none; }';
    $custom_blog_css .= '.trending_post_wrapper,.standard_trend_post_wrapper{background:' . $blog_bg_color . '; border:1px solid ' . $blog_border_color . '}';
    //timeline
    $custom_blog_css .= 'div.post_timeline:after,div.post_timeline:before{background:' . $blog_bg_color . '; box-shadow: 0 0 0 3px ' . $blog_bg_color . '; border:1px solid ' . $blog_hl_color . '}';
    $custom_blog_css .= '.timeline_ctn .v_line{background: ' . $blog_v_color . '; background: -moz-linear-gradient(top, ' . $blog_v_color . ' 1%, ' . $blog_v_alt_color . ' 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,' . $blog_v_color . '), color-stop(100%,' . $blog_v_alt_color . ')); background: -webkit-linear-gradient(top, ' . $blog_v_color . ' 1%,' . $blog_v_alt_color . ' 100%); background: -o-linear-gradient(top, ' . $blog_v_color . ' 1%,' . $blog_v_alt_color . ' 100%); background: -ms-linear-gradient(top, ' . $blog_v_color . ' 1%,' . $blog_v_alt_color . ' 100%); background: linear-gradient(to bottom, ' . $blog_v_color . ' 1%,' . $blog_v_alt_color . ' 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="' . $blog_v_color . '", endColorstr="' . $blog_v_alt_color . '",GradientType=0 );}';
    $custom_blog_css .= '.timeline_month{background:' . $blog_timelinedb_color . ';}';
    $custom_blog_css .= '.post_timeline .arrow_l,.post_timeline .arrow_r{color:' . $blog_heading_color . ';}.post_timeline:hover .arrow_l,.post_timeline:hover .arrow_r{color:' . $blog_hover_color . ';}';
    $custom_blog_css .= '.timeline_pd_l,.timeline_pd_r{background:' . $blog_heading_color . '; color:' . $blog_bg_color . ';}.timeline_pd_l:before,.timeline_pd_r:before{border-color:transparent ' . $blog_heading_color . ' transparent;}';
    $custom_blog_css .= '.post-attachement a.blog_img_overlay:before{background:' . $blog_hover_color . ';}';
    $custom_blog_css .= '.masonry_post_wrapper{box-shadow:0 0px 0px ' . $blog_bg_color . ', 0 10px 0 -1px ' . $blog_bg_color . ', 0 0px 0px 0px ' . $blog_bg_color . ',0 0px 0px ' . $blog_bg_color . ', 0 10px 0 0px ' . $blog_border_color . ', 0px 0px 0px 0px ' . $blog_bg_color . ';}';
    //multi author
    $custom_blog_css .= '.author_date_ctn .rounded_date_ctn{border-color:' . $blog_bg_color . '; color:' . $blog_bg_color . '; background:' . $blog_heading_color . ';}';
    $custom_blog_css .= '.multi_author_post:hover .rounded_date_ctn,.author_date_ctn:before{background:' . $blog_hl_color . ';}';
    $custom_blog_css .= '.multi_author_ctn,.multi_author_ctn:after,.author_date_ctn img{background:' . $blog_bg_color . '; border:1px solid ' . $blog_border_color . '; }';
    $custom_blog_css .= '</style>';
    echo !empty($custom_blog_css) ? $custom_blog_css : '';
    wp_enqueue_script('js_isotope', get_template_directory_uri() . '/js/jquery.isotope.min.js', array(), false, false);
    wp_enqueue_script('js_sorting_bp', get_template_directory_uri() . '/js/sorting_bp.js');
    wp_enqueue_script('js_refresh_bp', get_template_directory_uri() . '/js/refresh_bp.js');
    global $rd_data;
    $items_on_start = $posts_per_page;
    $items_per_click = $blog_click;
    $view_type = $type;
    $category = $category;
    wp_enqueue_style('wp-mediaelement');
    wp_enqueue_script('wp-playlist');
    ?>
<script>



jQuery.noConflict();
var $ = jQuery;

"use strict";

$(document).ready(function(){
<?php 
    if ($blog_navigation !== 'classic_nav') {
        ?>


   /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!CONFIG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/

                var html_template = "<?php 
        echo esc_js($view_type);
        ?>
";
                var column = "<?php 
        echo esc_js($column);
        ?>
";
                var cat = "<?php 
        echo esc_js($category);
        ?>
";
                var tn_size = "<?php 
        echo esc_js($tn_size);
        ?>
";
                var more_option = "<?php 
        echo esc_js($more_option);
        ?>
";
				var now_open_works = 0;
                var first_load = true;

   /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!CONFIG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/

                function get_blog_posts (this_obj) {

                    if(typeof(this_obj)=="undefined") {data_option_value="*";}
                    else {var data_option_value = this_obj.attr("data-option-value");}

                    if (first_load == true) {

                        works_per_load = <?php 
        echo esc_js($items_on_start);
        ?>
;
                        first_load = false;

                    } else {

                        works_per_load = <?php 
        echo esc_js($items_per_click);
        ?>
;

                    }

                    $.ajax({

                        type: "POST",
                        url: mixajaxurl,
                        data: "html_template="+html_template+"&now_open_works="+now_open_works+"&action=get_blog_posts"+"&works_per_load="+works_per_load+"&column="+column+"&first_load="+first_load+"&category="+cat+"&tn_size="+tn_size+"&more_option="+more_option+"",
                        success: function(result){

	                            if(result.length<1){
                                $("#rd_<?php 
        echo esc_js($id);
        ?>
 .blog_load_more_cont").hide("fast");
	                            }

                            now_open_works = now_open_works + works_per_load;
							first_load = false;
                            var $newItems = $(result);
                            $("#rd_<?php 
        echo esc_js($id);
        ?>
").isotope( 'insert', $newItems, function() {
                            $("#rd_<?php 
        echo esc_js($id);
        ?>
").ready(function(){
                            $("#rd_<?php 
        echo esc_js($id);
        ?>
").isotope('layout');

                            //Blog
                            $('#rd_<?php 
        echo esc_js($id);
        ?>
 .isotope-item').each(function(){
                            $(this).css('margin-top', Math.floor(-1*($(this).height()/2))+'px');
                            });
                            });


                               $("#rd_<?php 
        echo esc_js($id);
        ?>
").isotope('layout');
							   
							   $(window).trigger('resize');
							   
							});


$(".wpb_row:empty").remove();
$(".wpb_column:empty").remove();
$(".wpb_wrapper:empty").remove();
$(".post-attachement").fitVids();
$(".entry").fitVids();
$(".video_sc").fitVids();
/* global mejs, _wpmejsSettings */
	// add mime-type aliases to MediaElement plugin support
	mejs.plugins.silverlight[0].types.push('video/x-ms-wmv');
	mejs.plugins.silverlight[0].types.push('audio/x-ms-wma');

	$(function () {
		var settings = {};

		if ( typeof _wpmejsSettings !== 'undefined' ) {
			settings = _wpmejsSettings;
		}

		settings.success = function (mejs) {
			var autoplay, loop;

			if ( 'flash' === mejs.pluginType ) {
				autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay;
				loop = mejs.attributes.loop && 'false' !== mejs.attributes.loop;

				autoplay && mejs.addEventListener( 'canplay', function () {
					mejs.play();
				}, false );

				loop && mejs.addEventListener( 'ended', function () {
					mejs.play();
				}, false );
			}
		};

		$('.wp-audio-shortcode, .wp-video-shortcode').mediaelementplayer( settings );
	});

$('.wp-audio-shortcode').removeClass('wp-audio-shortcode');
$('.flexslider').flexslider({
animation: "slide",              //String: Select your animation type, "fade" or "slide"
slideDirection: "horizontal",
directionNav: true,
start: function(slider){ // init the height of the first item on start
var $new_height = slider.slides.eq().height();     
slider.height($new_height);                                     
},          

before: function(slider){ // init the height of the next item before slide
var $new_height = slider.slides.eq(slider.animatingTo).height();                
if($new_height != slider.height()){
slider.animate({ height: $new_height  }, 400);

}
}          

});
                            $('a.prettyPhoto').prettyPhoto();
					
							$(".refresh_icn").removeClass("fa-spin");
							$(".refresh_icn").removeClass("fa-refresh");
							$(".refresh_icn").addClass("fa-plus");

                    }   

                    });
					
				}

                $(".get_blog_posts_btn").click(function(){
				$(".refresh_icn").removeClass("fa-plus");
				$(".refresh_icn").addClass("fa-refresh");
                $(".refresh_icn").addClass("fa-spin");
                get_blog_posts();						
					$(".masonry_ctn").isotope('layout');

				return false;

                });


               /* load at start */

                $(window).load(function(){

                get_blog_posts();
				
	
				
				
$('.masonry_ctn').isotope({
  // options
  itemSelector : '.ajax_post',
  layoutMode : 'masonry'
});

<?php 
    } else {
        ?>

 $(window).load(function(){
<?php 
    }
    ?>

function watchblog() {

$(".masonry_ctn").isotope({
  // options
  itemSelector : '.ajax_post',
  layoutMode : 'masonry'
});

}

setInterval(watchblog, 100);

});});


</script>
<?php 
    if ($type == 'type2') {
        ?>

<div class="timeline_ctn">
<div class="v_line"></div>
<?php 
    }
    ?>
<div id="rd_<?php 
    echo esc_attr($id);
    ?>
" class="masonry_ctn <?php 
    if ($type == 'type2') {
        echo 'blog_timeline';
    } elseif ($type == 'type4' || $type == 'type6') {
        echo 'grid_post';
    } elseif ($type == 'type3') {
        echo 'blog_masonry';
    } elseif ($type == 'type7') {
        echo 'standard_trending';
    }
    if ($type == 'type6' || $type == 'type7') {
        echo ' trend_loadmore';
    }
    if ($blog_navigation !== 'classic_nav') {
        echo ' ajax_blog';
    }
    ?>
">
<?php 
    if ($blog_navigation == 'classic_nav') {
        if (get_query_var('paged')) {
            $paged = get_query_var('paged');
        } elseif (get_query_var('page')) {
            $paged = get_query_var('page');
        } else {
            $paged = 1;
        }
        if ($category !== "all" && $category !== "") {
            query_posts('category_name=' . $category . '&posts_per_page=' . $posts_per_page . '&paged=' . $paged . '&post_status=publish');
        } else {
            query_posts('posts_per_page=' . $posts_per_page . '&paged=' . $paged . '&post_status=publish');
        }
        global $more, $post;
        $more = 0;
        while (have_posts()) {
            the_post();
            global $rd_data;
            if ($type == 'type1') {
                ?>

<div class="post ajax_post" <?php 
                post_class();
                ?>
>

<?php 
                $post_format = get_post_format();
                $content = get_the_content(__('Read more', 'thefoxwp'));
                $my_video = get_post_meta($post->ID, 'rd_video', true);
                $quote_text = get_post_meta($post->ID, 'rd_quote', true);
                $quote_author = get_post_meta($post->ID, 'rd_quote_author', true);
                if ($post_format == 'quote') {
                    echo '<a class="post_quote_ctn" href="';
                    echo the_permalink();
                    echo '"><div class="post_quote_text" >';
                    echo !empty($quote_text) ? $quote_text : '';
                    echo '<span class="post_quote_icon fa-link"></span></div>';
                    echo '<div class="post_quote_author" >';
                    echo !empty($quote_author) ? $quote_author : '';
                    echo '</div>';
                    echo '</a></div>';
                } else {
                    if (get_post_meta($post->ID, 'rd_show_slider', true) == 'yes') {
                        if ($post_format == '' && '' != get_the_post_thumbnail() || $post_format == 'image' && '' != get_the_post_thumbnail()) {
                            $url = wp_get_attachment_url(get_post_thumbnail_id($post->ID), 'full');
                            echo "<div class='post-attachement'>";
                            echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                            if ($tn_size !== '') {
                                echo the_post_thumbnail('full');
                            } else {
                                echo the_post_thumbnail('blog_tn');
                            }
                            echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></div><div class='sep_25'></div>";
                        } elseif ($post_format == 'audio') {
                            preg_match("!\\[audio.+?\\]\\[\\/audio\\]!", $content, $match_audio);
                            if (!empty($match_audio)) {
                                echo '<div class="audio_ctn" >';
                                echo do_shortcode($match_audio[0]);
                                echo '</div>';
                                $content = str_replace($match_audio[0], "", $content);
                                $content = apply_filters('the_content', $content);
                                $content = str_replace(']]>', ']]&gt;', $content);
                                echo "<div class='sep_25'></div>";
                            }
                        } elseif ($post_format == 'video' && $my_video !== '') {
                            echo "<div class='post-attachement'>" . $my_video . "</div><div class='sep_25'></div>";
                        } elseif ($post_format == 'gallery') {
                            $galleryArray = get_post_gallery_ids($post->ID);
                            if ($galleryArray) {
                                echo "<div class='post-attachement'><div class='flexslider'><ul class='slides'>";
                                foreach ($galleryArray as $id) {
                                    $url = wp_get_attachment_url($id, 'full', 0);
                                    echo "<li>";
                                    echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                                    if ($tn_size !== '') {
                                        echo wp_get_attachment_image($id, 'full', 0);
                                    } else {
                                        echo wp_get_attachment_image($id, 'blog_tn', 0);
                                    }
                                    echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></li>";
                                }
                                echo "</ul></div></div><div class='sep_25'></div>";
                            }
                        }
                    }
                    ?>
  <div class="post_ctn"> 
    <!-- .title -->
    <div class="post-title">
      <h2><a href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    the_title();
                    ?>
">
        <?php 
                    the_title();
                    ?>
        </a></h2>
    </div>
     <!-- .title END--> 
     <!-- post-info-top -->
    
    <div class="post-info"><?php 
                    echo __('By', 'thefoxwp');
                    ?>
 <?php 
                    the_author();
                    ?>
    |    <?php 
                    the_category(', ');
                    ?>
    |    <?php 
                    comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                    ?>
    |    <?php 
                    the_time('j F, Y');
                    ?>
    |    <?php 
                    if (function_exists('zilla_likes')) {
                        echo do_shortcode('[zilla_likes]');
                    }
                    ?>
</div>
   
    
    <!-- post-info END-->     
    <!-- .entry -->    
    <div class="entry">
      <?php 
                    if ($post_format == 'audio') {
                        echo !empty($content) ? $content : '';
                    } elseif ($more_option == 'cutted') {
                        rd_custom_excerpt('rd_port_long_excerpt', 'rd_related_more');
                    } else {
                        the_content(__('Read more', 'thefoxwp'));
                    }
                    ?>
    </div>   
    <!-- .entry END --> 
     </div>
	</div>
	<!-- .post-content END--> 
	<!-- .post END -->

<?php 
                }
            } elseif ($type == 'type7') {
                ?>

<div class="post ajax_post" <?php 
                post_class();
                ?>
>
<div class="standard_trend_post_wrapper">
<?php 
                $post_format = get_post_format();
                $content = get_the_content(__('Read more', 'thefoxwp'));
                $my_video = get_post_meta($post->ID, 'rd_video', true);
                $quote_text = get_post_meta($post->ID, 'rd_quote', true);
                $quote_author = get_post_meta($post->ID, 'rd_quote_author', true);
                if ($post_format == 'quote') {
                    echo '<a class="post_quote_ctn" href="';
                    echo the_permalink();
                    echo '"><div class="post_quote_text" >';
                    echo !empty($quote_text) ? $quote_text : '';
                    echo '<span class="post_quote_icon fa-link"></span></div>';
                    echo '<div class="post_quote_author" >';
                    echo !empty($quote_author) ? $quote_author : '';
                    echo '</div>';
                    echo '</a></div>';
                } else {
                    if (get_post_meta($post->ID, 'rd_show_slider', true) == 'yes') {
                        if ($post_format == '' && '' != get_the_post_thumbnail() || $post_format == 'image' && '' != get_the_post_thumbnail()) {
                            $url = wp_get_attachment_url(get_post_thumbnail_id($post->ID), 'full');
                            echo "<div class='post-attachement'>";
                            echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                            if ($tn_size !== '') {
                                echo the_post_thumbnail('full');
                            } else {
                                echo the_post_thumbnail('blog_tn');
                            }
                            echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></div><div class='sep_25'></div>";
                        } elseif ($post_format == 'audio') {
                            preg_match("!\\[audio.+?\\]\\[\\/audio\\]!", $content, $match_audio);
                            if (!empty($match_audio)) {
                                echo '<div class="audio_ctn" >';
                                echo do_shortcode($match_audio[0]);
                                echo '</div>';
                                $content = str_replace($match_audio[0], "", $content);
                                $content = apply_filters('the_content', $content);
                                $content = str_replace(']]>', ']]&gt;', $content);
                                echo "<div class='sep_25'></div>";
                            }
                        } elseif ($post_format == 'video' && $my_video !== '') {
                            echo "<div class='post-attachement'>" . $my_video . "</div><div class='sep_25'></div>";
                        } elseif ($post_format == 'gallery') {
                            $galleryArray = get_post_gallery_ids($post->ID);
                            if ($galleryArray) {
                                echo "<div class='post-attachement'><div class='flexslider'><ul class='slides'>";
                                foreach ($galleryArray as $id) {
                                    $url = wp_get_attachment_url($id, 'full', 0);
                                    echo "<li>";
                                    echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                                    if ($tn_size !== '') {
                                        echo wp_get_attachment_image($id, 'full', 0);
                                    } else {
                                        echo wp_get_attachment_image($id, 'blog_tn', 0);
                                    }
                                    echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></li>";
                                }
                                echo "</ul></div></div><div class='sep_25'></div>";
                            }
                        }
                    }
                    ?>
  <div class="post_ctn"> 
       <!-- post-info-top -->
    
    <div class="post-info"><?php 
                    the_time('j F, Y');
                    ?>
    /    <?php 
                    the_category(', ');
                    ?>
    /    <?php 
                    comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                    ?>
</div>
   
    
    <!-- post-info END--> 
    <!-- .title -->
    <div class="post-title">
      <h2><a href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    the_title();
                    ?>
">
        <?php 
                    the_title();
                    ?>
        </a></h2>
    </div>
     <!-- .title END--> 
    
    <!-- .entry -->    
    <div class="entry">
<?php 
                    echo rd_custom_excerpt('rd_port_long_excerpt', 'rd_trend_more');
                    ?>
    </div>   
    <!-- .entry END --> 
    <div class="post-info-bottom">
    <?php 
                    the_author();
                    if (function_exists('zilla_likes')) {
                        echo do_shortcode('[zilla_likes]');
                    }
                    ?>
    </div>
     </div>
     </div>
	</div>
	<!-- .post-content END--> 
	<!-- .post END -->

<?php 
                }
            } elseif ($type == 'type5') {
                ?>

<div class="post ajax_post multi_author_post">
<div class="author_date_ctn">
<?php 
                if (function_exists('get_avatar')) {
                    echo get_avatar(get_the_author_meta('email'), 103);
                }
                ?>
<div class="rounded_date_ctn">
<div class="author_date_d"> <?php 
                echo get_the_time('d');
                ?>
 </div>
<div class="author_date_m"> <?php 
                echo get_the_time('M');
                ?>
 </div>
</div>
</div>

<div class="multi_author_ctn">

  <?php 
                $post_format = get_post_format();
                $content = get_the_content(__('Read more', 'thefoxwp'));
                $my_video = get_post_meta($post->ID, 'rd_video', true);
                $quote_text = get_post_meta($post->ID, 'rd_quote', true);
                $quote_author = get_post_meta($post->ID, 'rd_quote_author', true);
                if (get_post_meta($post->ID, 'rd_show_slider', true) == 'yes') {
                    if ($post_format == 'quote') {
                        echo '<a class="post_quote_ctn" href="';
                        echo the_permalink();
                        echo '"><div class="post_quote_text" >';
                        echo !empty($quote_text) ? $quote_text : '';
                        echo '<span class="post_quote_icon fa-link"></span></div>';
                        echo '<div class="post_quote_author" >';
                        echo !empty($quote_author) ? $quote_author : '';
                        echo '</div>';
                        echo '</a><div class="sep_25"></div>';
                    } elseif ($post_format == '' && '' != get_the_post_thumbnail() || $post_format == 'image' && '' != get_the_post_thumbnail()) {
                        $url = wp_get_attachment_url(get_post_thumbnail_id($post->ID), 'full');
                        echo "<div class='post-attachement'>";
                        echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                        if ($tn_size == 'full') {
                            echo the_post_thumbnail('full');
                        } else {
                            echo the_post_thumbnail('blog_tn');
                        }
                        echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></div><div class='sep_25'></div>";
                    } elseif ($post_format == 'audio') {
                        preg_match("!\\[audio.+?\\]\\[\\/audio\\]!", $content, $match_audio);
                        if (!empty($match_audio)) {
                            echo '<div class="audio_ctn" >';
                            echo do_shortcode($match_audio[0]);
                            echo '</div>';
                            $content = str_replace($match_audio[0], "", $content);
                            $content = apply_filters('the_content', $content);
                            $content = str_replace(']]>', ']]&gt;', $content);
                            echo "<div class='sep_25'></div>";
                        }
                    } elseif ($post_format == 'video' && $my_video !== '') {
                        echo "<div class='post-attachement'>" . $my_video . "</div><div class='sep_25'></div>";
                    } elseif ($post_format == 'gallery') {
                        $galleryArray = get_post_gallery_ids($post->ID);
                        if ($galleryArray) {
                            echo "<div class='post-attachement'><div class='flexslider'><ul class='slides'>";
                            foreach ($galleryArray as $id) {
                                $url = wp_get_attachment_url($id, 'full', 0);
                                echo "<li>";
                                echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                                if ($tn_size == 'full') {
                                    echo wp_get_attachment_image($id, 'full', 0);
                                } else {
                                    echo wp_get_attachment_image($id, 'blog_tn', 0);
                                }
                                echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></li>";
                            }
                            echo "</ul></div></div><div class='sep_25'></div>";
                        }
                    }
                    ?>
  <div class="post_ctn"> 
    <!-- .title -->
    <div class="post-title">
      <h2><a href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    the_title();
                    ?>
">
        <?php 
                    the_title();
                    ?>
        </a></h2>
    </div>
    
    <!-- .title END--> 
    
    <!-- post-info-top -->
    
    <div class="post-info"><?php 
                    echo __('By', 'thefoxwp');
                    ?>
 <?php 
                    the_author();
                    ?>
    |    <?php 
                    the_category(', ');
                    ?>
    |    <?php 
                    comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                    ?>
    |    <?php 
                    if (function_exists('zilla_likes')) {
                        echo do_shortcode('[zilla_likes]');
                    }
                    ?>
</div>
    
    <!-- post-info END--> 
    
    <!-- .entry -->
    
    <div class="entry">
      <?php 
                    if ($post_format == 'audio') {
                        echo !empty($content) ? $content : '';
                    } else {
                        the_content(__('Read more', 'thefoxwp'));
                    }
                    ?>
    </div>
    
    <!-- .entry END --> 
    
  </div>
  <!-- .post-content END--> 
  </div>
  <!-- .multi_author_ctn END--> 
</div>

<!-- .post END -->

<?php 
                }
            } elseif ($type == 'type4') {
                ?>

<div class="post ajax_post grid_blog_post <?php 
                echo esc_attr($column . '');
                ?>
 " <?php 
                post_class();
                ?>
>

<?php 
                $post_format = get_post_format();
                $content = get_the_content(__('Read more', 'thefoxwp'));
                $my_video = get_post_meta($post->ID, 'rd_video', true);
                $quote_text = get_post_meta($post->ID, 'rd_quote', true);
                $quote_author = get_post_meta($post->ID, 'rd_quote_author', true);
                if ($post_format == 'quote') {
                    echo '<a class="post_quote_ctn" href="';
                    echo the_permalink();
                    echo '"><div class="post_quote_text" >';
                    echo !empty($quote_text) ? $quote_text : '';
                    echo '<span class="post_quote_icon fa-link"></span></div>';
                    echo '<div class="post_quote_author" >';
                    echo !empty($quote_author) ? $quote_author : '';
                    echo '</div>';
                    echo '</a><div class="sep_25"></div>';
                } else {
                    if ($post_format !== 'gallery' && $post_format !== 'audio' && '' != get_the_post_thumbnail()) {
                        $url = wp_get_attachment_url(get_post_thumbnail_id($post->ID), 'full');
                        echo "<div class='post-attachement'>";
                        echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                        echo the_post_thumbnail('blog_tn_alt');
                        echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></div><div class='sep_25'></div>";
                    } elseif ($post_format == 'audio') {
                        $url = wp_get_attachment_url(get_post_thumbnail_id($post->ID), 'full');
                        preg_match("!\\[audio.+?\\]\\[\\/audio\\]!", $content, $match_audio);
                        if (!empty($match_audio)) {
                            echo "<div class='post-attachement'>";
                            echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                            echo the_post_thumbnail('blog_tn_alt');
                            echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a>";
                            echo '<div class="audio_ctn" >';
                            echo do_shortcode($match_audio[0]);
                            echo '</div></div>';
                            $content = str_replace($match_audio[0], "", $content);
                            $content = apply_filters('the_content', $content);
                            $content = str_replace(']]>', ']]&gt;', $content);
                            echo "<div class='sep_25'></div>";
                        }
                    } elseif ($post_format == 'gallery') {
                        $galleryArray = get_post_gallery_ids($post->ID);
                        if ($galleryArray) {
                            echo "<div class='post-attachement'><div class='flexslider'><ul class='slides'>";
                            foreach ($galleryArray as $id) {
                                $url = wp_get_attachment_url($id, 'full', 0);
                                echo "<li>";
                                echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                                echo wp_get_attachment_image($id, 'blog_tn_alt', 0);
                                echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></li>";
                            }
                            echo "</ul></div></div><div class='sep_25'></div>";
                        }
                    }
                }
                ?>
  <div class="post_ctn"> 
    <!-- .title -->
    <div class="post-title">
      <h2><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
        <?php 
                the_title();
                ?>
        </a></h2>
    </div>
     <!-- .title END--> 
     <!-- post-info-top -->    
    <div class="post-info"><?php 
                echo __('By', 'thefoxwp');
                ?>
 <?php 
                the_author();
                ?>
    |    <?php 
                comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                ?>
</div>
     
    <!-- post-info END-->     
    <!-- .entry -->    
    <div class="entry">
<?php 
                the_excerpt();
                ?>
    </div>   
    <!-- .entry END --> 
     </div>
	</div>
	<!-- .post-content END--> 
	<!-- .post END -->

<?php 
            } elseif ($type == 'type6') {
                ?>

<div class="post ajax_post grid_trend_blog_post <?php 
                echo esc_attr($column . '');
                ?>
 " <?php 
                post_class();
                ?>
>
<div class="trending_post_wrapper">
<?php 
                $post_format = get_post_format();
                $content = get_the_content(__('Read more', 'thefoxwp'));
                $my_video = get_post_meta($post->ID, 'rd_video', true);
                $quote_text = get_post_meta($post->ID, 'rd_quote', true);
                $quote_author = get_post_meta($post->ID, 'rd_quote_author', true);
                if ($post_format == 'quote') {
                    echo '<a class="post_quote_ctn" href="';
                    echo the_permalink();
                    echo '"><div class="post_quote_text" >';
                    echo !empty($quote_text) ? $quote_text : '';
                    echo '<span class="post_quote_icon fa-link"></span></div>';
                    echo '<div class="post_quote_author" >';
                    echo !empty($quote_author) ? $quote_author : '';
                    echo '</div>';
                    echo '</a><div class="sep_25"></div>';
                } else {
                    if ($post_format !== 'gallery' && $post_format !== 'audio' && '' != get_the_post_thumbnail()) {
                        $url = wp_get_attachment_url(get_post_thumbnail_id($post->ID), 'full');
                        echo "<div class='post-attachement'>";
                        echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                        echo the_post_thumbnail('blog_tn_alt');
                        echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></div><div class='sep_25'></div>";
                    } elseif ($post_format == 'audio') {
                        $url = wp_get_attachment_url(get_post_thumbnail_id($post->ID), 'full');
                        preg_match("!\\[audio.+?\\]\\[\\/audio\\]!", $content, $match_audio);
                        if (!empty($match_audio)) {
                            echo "<div class='post-attachement'>";
                            echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                            echo the_post_thumbnail('blog_tn_alt');
                            echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a>";
                            echo '<div class="audio_ctn" >';
                            echo do_shortcode($match_audio[0]);
                            echo '</div></div>';
                            $content = str_replace($match_audio[0], "", $content);
                            $content = apply_filters('the_content', $content);
                            $content = str_replace(']]>', ']]&gt;', $content);
                            echo "<div class='sep_25'></div>";
                        }
                    } elseif ($post_format == 'gallery') {
                        $galleryArray = get_post_gallery_ids($post->ID);
                        if ($galleryArray) {
                            echo "<div class='post-attachement'><div class='flexslider'><ul class='slides'>";
                            foreach ($galleryArray as $id) {
                                $url = wp_get_attachment_url($id, 'full', 0);
                                echo "<li>";
                                echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                                echo wp_get_attachment_image($id, 'blog_tn_alt', 0);
                                echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></li>";
                            }
                            echo "</ul></div></div><div class='sep_25'></div>";
                        }
                    }
                }
                ?>
  <div class="post_ctn"> 
    <!-- .title -->
    <div class="post-title">
      <h2><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
        <?php 
                the_title();
                ?>
        </a></h2>
    </div>
     <!-- .title END--> 
     <!-- post-info-top -->    
    <div class="post-info"><?php 
                the_category(', ');
                ?>
    |    <?php 
                comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                ?>
    |    <?php 
                if (function_exists('zilla_likes')) {
                    echo do_shortcode('[zilla_likes]');
                }
                ?>
</div>
     
    <!-- post-info END-->     
    <!-- .entry -->    
    <div class="entry">
<?php 
                echo rd_custom_excerpt('rd_staff3_excerpt', 'rd_trend_more');
                ?>
    </div>   
    <!-- .entry END --> 
     </div>
     
     </div>
	</div>
	<!-- .post-content END--> 
	<!-- .post END -->

<?php 
            } elseif ($type == 'type3') {
                ?>
	
<div class="ajax_post post_masonry <?php 
                echo esc_attr($column);
                ?>
 ">


 <div class="masonry_post_wrapper">
<?php 
                $post_format = get_post_format();
                $content = get_the_content(__('Read more', 'thefoxwp'));
                $my_video = get_post_meta($post->ID, 'rd_video', true);
                $quote_text = get_post_meta($post->ID, 'rd_quote', true);
                $quote_author = get_post_meta($post->ID, 'rd_quote_author', true);
                if (get_post_meta($post->ID, 'rd_show_slider', true) == 'yes') {
                    if ($post_format == '' && '' != get_the_post_thumbnail() || $post_format == 'image' && '' != get_the_post_thumbnail()) {
                        $url = wp_get_attachment_url(get_post_thumbnail_id($post->ID), 'full');
                        echo "<div class='post-attachement'>";
                        echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                        echo the_post_thumbnail('full');
                        echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></div><div class='sep_25'></div>";
                    } elseif ($post_format == 'quote') {
                        echo '<a class="post_quote_ctn" href="';
                        echo the_permalink();
                        echo '"><div class="post_quote_text" >';
                        echo !empty($quote_text) ? $quote_text : '';
                        echo '<span class="post_quote_icon fa-link"></span></div>';
                        echo '<div class="post_quote_author" >';
                        echo !empty($quote_author) ? $quote_author : '';
                        echo '</div>';
                        echo '</a>';
                    } elseif ($post_format == 'audio') {
                        preg_match("!\\[audio.+?\\]\\[\\/audio\\]!", $content, $match_audio);
                        if (!empty($match_audio)) {
                            echo '<div class="audio_ctn" >';
                            echo do_shortcode($match_audio[0]);
                            echo '</div>';
                            $content = str_replace($match_audio[0], "", $content);
                            $content = apply_filters('the_content', $content);
                            $content = str_replace(']]>', ']]&gt;', $content);
                            echo "<div class='sep_25'></div>";
                        }
                    } elseif ($post_format == 'video' && $my_video !== '') {
                        echo "<div class='post-attachement'>" . $my_video . "</div><div class='sep_25'></div>";
                    } elseif ($post_format == 'gallery') {
                        $galleryArray = get_post_gallery_ids($post->ID);
                        if ($galleryArray) {
                            echo "<div class='post-attachement'><div class='flexslider'><ul class='slides'>";
                            foreach ($galleryArray as $id) {
                                $url = wp_get_attachment_url($id, 'full', 0);
                                echo "<li>";
                                echo '<a href="' . get_permalink($post->ID) . '" class="blog_img_overlay">';
                                echo wp_get_attachment_image($id, 'full', 0);
                                echo "</a><a href='" . $url . "' class='prettyPhoto post-att-zoom'><i class='fa fa-expand'></i></a></li>";
                            }
                            echo "</ul></div></div><div class='sep_25'></div>";
                        }
                    }
                }
                if ($post_format !== 'quote') {
                    ?>
<!-- .title -->
<div class="post-title">
<h2><a href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    the_title();
                    ?>
">
<?php 
                    the_title();
                    ?>
</a></h2>
</div>
<!-- .title END--> 
<!-- post-info-top -->
<div class="post-info"><?php 
                    echo __('By', 'thefoxwp');
                    ?>
 <?php 
                    the_author();
                    ?>
    |    <?php 
                    the_time('j F, Y');
                    ?>
</div>
<!-- post-info END--> 
<!-- .entry -->
<div class="entry">
      <?php 
                    if ($post_format == 'audio') {
                        echo !empty($content) ? $content : '';
                    } else {
                        the_content(__('Read more', 'thefoxwp'));
                    }
                    ?>
</div> <?php 
                }
                ?>
<div class="post-bottom-info"><span class="info_comment"><?php 
                comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                ?>
    |    </span><span class="info_like"><?php 
                if (function_exists('zilla_likes')) {
                    echo do_shortcode('[zilla_likes]');
                }
                ?>
</span></div>
</div>
</div>
<!-- .post-content END--> 
<!-- .post END -->	
	<?php 
            }
        }
        if ($blog_navigation == 'classic_nav') {
            ?>

<!-- .navigation -->
</div>
<div class="navigation clearfix">
  <?php 
            kriesi_pagination();
            ?>
</div>

<!-- .navigation END -->

<?php 
        }
    }
    if ($type == 'type2') {
        echo '</div>';
    }
    if ($blog_navigation !== 'classic_nav' && $type !== 'type5') {
        echo '<div class="blog_load_more_cont"><a class="btn_load_more get_blog_posts_btn" href="#"><span class="fa-plus refresh_icn"></span>' . __('Load More', 'thefoxwp') . '</a></div></div><div class="clear"><!-- ClearFix --></div>';
    } elseif ($blog_navigation !== 'classic_nav') {
        echo '<div class="blog_load_more_cont multi_author_load"><a class="btn_load_more get_blog_posts_btn" href="#"><span class="fa-plus refresh_icn"></span></a></div></div><div class="clear"><!-- ClearFix --></div>';
    }
    wp_reset_postdata();
    $output_string = ob_get_contents();
    ob_end_clean();
    return $output_string;
}
Esempio n. 16
0
<?php

/**
 * Pagination - Show numbered pagination for catalog pages.
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.0.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $wp_query;
if ($wp_query->max_num_pages <= 1) {
    return;
}
kriesi_pagination($wp_query->max_num_pages, $range = 2);
        woocommerce_get_template_part('content', 'product');
    }
    // end of the loop.
    woocommerce_product_loop_end();
} elseif (!woocommerce_product_subcategories(array('before' => woocommerce_product_loop_start(false), 'after' => woocommerce_product_loop_end(false)))) {
    woocommerce_get_template('loop/no-products-found.php');
}
/**
 * woocommerce_sidebar hook
 *
 * @hooked woocommerce_get_sidebar - 10
 */
do_action('woocommerce_sidebar');
/**
 * woocommerce_after_main_content hook
 *
 */
do_action('woocommerce_after_main_content');
if (kriesi_pagination()) {
    ?>

	    <div class="dark-wrapper">
	      <?php 
    do_action('ebor_open_wrapper');
    echo function_exists('kriesi_pagination') ? kriesi_pagination() : posts_nav_link();
    do_action('ebor_close_wrapper');
    ?>
	    </div>
	    
<?php 
}
Esempio n. 18
0
        printf(esc_html__('Yearly Archives: %s', 'wpestate'), '<span>' . get_the_date(_x('Y', 'yearly archives date format', 'wpestate')) . '</span>');
    } else {
        esc_html_e('Blog Archives', 'wpestate');
    }
}
?>
        </h1>
             
        <div class="blog_list_wrapper row">    
            <?php 
while (have_posts()) {
    the_post();
    get_template_part('templates/blog_unit');
}
wp_reset_query();
?>
            
        </div>
        <?php 
kriesi_pagination('', $range = 2);
?>
     
    </div><!-- end 8col container-->
    
<?php 
include locate_template('sidebar.php');
?>
</div>   

<?php 
get_footer();
Esempio n. 19
0
// end of the loop.
?>
  

              
        <div class="blog_list_wrapper row agent_list">    
        <?php 
$paged = get_query_var('paged') ? get_query_var('paged') : 0;
$args = array('post_type' => 'estate_agent', 'paged' => $paged, 'posts_per_page' => 9);
$agent_selection = new WP_Query($args);
while ($agent_selection->have_posts()) {
    $agent_selection->the_post();
    get_template_part('templates/agent_unit');
}
wp_reset_query();
?>
        
           
        </div>
        <?php 
kriesi_pagination($agent_selection->max_num_pages, $range = 2);
?>
    
    </div><!-- end 8col container-->
    
<?php 
include locate_template('sidebar.php');
?>
</div>   
<?php 
get_footer();
Esempio n. 20
0
    while (have_posts()) {
        the_post();
        ?>

		<?php 
        get_template_part('content', 'blog');
        ?>

	<?php 
    }
    ?>
	
	
	<div class="clearfix"></div>
	<?php 
    kriesi_pagination($pages = '', $range = 2);
    ?>
	<!--div><?php 
    posts_nav_link();
    // default tag
    ?>
</div-->

<?php 
} elseif (current_user_can('edit_posts')) {
    ?>

	<?php 
    get_template_part('no-results', 'index');
    ?>
    if ($data['show_view_more']) {
        ?>
                                	<div class="small_read_more"><a href="<?php 
        the_permalink();
        ?>
" class="button small button_default"><?php 
        _e('Continue Reading &rarr;', 'Creativo');
        ?>
</a></div>
                                <?php 
    }
    ?>
                            </div>
                        </div>  
                        <div class="clr"></div>  
                       
                    </div>
                    <div class="blogpost_split"></div>   
                    <?php 
}
?>
                <?php 
kriesi_pagination($blog->max_num_pages, $range = 20);
?>
 
             </div>
             
        </div>        
       <div class="clr"></div>		
<?php 
get_footer();
        echo get_post_type(get_the_ID());
        ?>
         </div>
        <!-- /.blog-post -->
            <?php 
    }
    ?>
            <?php 
} else {
    ?>
               <div class="psearch-content">
           			<h4 class="entry-title"><?php 
    _e('Nothing Found', 'oblivion');
    ?>
</h4>
                    <p><?php 
    _e('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'oblivion');
    ?>
</p>
                </div><!-- .entry-content -->
            <?php 
}
?>
              <div class="pagination">
            <ul>
              <li>
                <?php 
$additional_loop = new WP_Query('showposts=' . $showposts . '&paged=' . $paged . '&s=' . get_search_query() . '&post_type=array(post,portfolio)');
$page = $additional_loop->max_num_pages;
echo kriesi_pagination($additional_loop->max_num_pages);
?>
Esempio n. 23
0
            ?>
<div class="clearfix"></div><?php 
        }
        ?>

<?php 
        $count++;
        $count_2++;
    }
    ?>
<div class="clearfix"></div>
</div><!-- close #portfolio-post-container -->

<div class="clearfix"></div>
<?php 
    kriesi_pagination($portfolioloop->max_num_pages, $range = 2);
    ?>

<?php 
}
?>

<?php 
if (of_get_option('page_comments_default', '0')) {
    comments_template('', true);
}
?>

<div class="clearfix"></div>
</div><!-- close #container-sidebar -->
<?php 
Esempio n. 24
0
 * @package Catreina
 * @since Catreina 1.0
 *
 *********************************************************/
get_header();
if (function_exists('dynamic_sidebar') && is_active_sidebar('blog')) {
    ?>
    <!-- Left wrapper Start -->
    <div id="left_wrapper">
  <?php 
} else {
    ?>
    <div id="full_page_wrapper">
  <?php 
}
$pagination = kriesi_pagination($main_post->max_num_pages);
// While we are looping through the posts, we want to take the excerpt and display the data for the
// post in question without displaying the entire post. This will prevent duplicated content (multiple
// pages with the same content but different URIs
?>
      <div id="post_wrapper">
        <div class="info">
          <h1>Blog Index</h1>
        </div>
        <div id="body">
          <p class="uscurrent">
            <small>
              This is an index of excerpts for every blog post on the site. Pagination is at the bottom and top of each page,
              and a quick overview of site statistics is available on the right. Below the statistics you can see Catreina's
              Twitch channel status, the most recent YouTube video, and today's schedule.
            </small>
Esempio n. 25
0
    the_title();
    ?>
">
										                               <i class="fa fa-search-plus"></i>
										                            </a>
										                     </span>
										                    
										             </div><!--/Gallery image-->  
										 	  </li><!-- small list-->
										  <?php 
}
?>
 
										  <div class="clearfix"></div> 
			                    <?php 
echo kriesi_pagination();
?>
									   </ul><!-- image list-->                                   
			                         <?php 
wp_reset_query();
?>
		
				        	
				        </div><!--/photogal-->
					
                   </div><!--/grid-->
		      </div><!--/row-->
		</div><!--/conatinr-->

			
</p>
      
    <?php 
}
?>
	
	<?php 
if (kriesi_pagination()) {
    ?>
	    <div class="dark-wrapper">
	      <?php 
    do_action('ebor_open_wrapper');
    ?>
	      
	        <?php 
    echo function_exists('kriesi_pagination') ? kriesi_pagination($blog_query->max_num_pages) : posts_nav_link();
    ?>
	        
	      <?php 
    do_action('ebor_close_wrapper');
    ?>
	    </div>
    <?php 
}
?>
    
    <?php 
wp_reset_query();
?>
    
</div>