Esempio n. 1
0
    |    <?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 {
                rd_custom_excerpt('rd_port_long_excerpt', 'rd_related_more');
            }
            ?>
    </div>   
    <!-- .entry END --> 
     </div>
	</div>
	<!-- .post-content END--> 
	<!-- .post END -->
      
      <?php 
        }
    }
    ?>
      
      <!-- .navigation -->
Esempio n. 2
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;
}
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;
}
function recent_port_sc($atts, $content = null)
{
    extract(shortcode_atts(array('margin_top' => '0', 'margin_bottom' => '0', 'to_show' => '1000', 'posts_per_line' => '4', 'heading_color' => '', 'text_color' => '', 'bg_color' => '', 'alt_bg_color' => '', 'border_color' => '', 'h_bg_color' => '', 'h_text_color' => '', 'style' => '', 'title' => '', 'desc' => '', 'pos' => '', 'category' => 'all', 'tags' => 'all'), $atts));
    ob_start();
    $rport_rs = RandomString(20);
    if ($style == 'rd_pc_1') {
        echo '<style>.rd_' . $rport_rs . ' .port_details{background:' . $bg_color . '; border:1px solid ' . $border_color . '; }.rd_' . $rport_rs . ' .port_details:before{background:' . $bg_color . ';}.rd_' . $rport_rs . ' .carousel_recent_post:hover .port_details{background:' . $h_bg_color . '; border:1px solid ' . $h_bg_color . '; }.rd_' . $rport_rs . ' .carousel_recent_post:hover .port_details:before{background:' . $h_bg_color . ';}.rd_' . $rport_rs . ' .port_details h2 a{color:' . $heading_color . ';}.rd_' . $rport_rs . ' .port_details h3{color:' . $text_color . ';}.rd_' . $rport_rs . ' .carousel_recent_post:hover .port_details h2 a,.rd_' . $rport_rs . ' .carousel_recent_post:hover .port_details h3{color:' . $h_text_color . '; }</style>';
    }
    if ($style == 'rd_pc_2') {
        echo '<style>.rd_' . $rport_rs . ' .carousel_recent_post:nth-child(odd) .port_details{background:' . $bg_color . '; }.rd_' . $rport_rs . '  .carousel_recent_post:nth-child(odd) .port_details:before{background:' . $bg_color . ';}.rd_' . $rport_rs . '  .carousel_recent_post:nth-child(even) .port_details{background:' . $alt_bg_color . '; }.rd_' . $rport_rs . '  .carousel_recent_post:nth-child(even) .port_details:before{background:' . $alt_bg_color . ';}.rd_' . $rport_rs . ' .carousel_recent_post:hover .port_details{background:' . $h_bg_color . ';}.rd_' . $rport_rs . ' .carousel_recent_post:hover .port_details:before{background:' . $h_bg_color . ';}.rd_' . $rport_rs . ' .port_details h2 a{color:' . $heading_color . ';}.rd_' . $rport_rs . ' .port_details h3{color:' . $text_color . ';}.rd_' . $rport_rs . ' .carousel_recent_post:hover .port_details h2 a,.rd_' . $rport_rs . ' .carousel_recent_post:hover .port_details h3{color:' . $h_text_color . '; }</style>';
    }
    echo '
		<script type="text/javascript" charset="utf-8">
		var j$ = jQuery;
		j$.noConflict();		
		"use strict";
	//setup up Carousel
		j$(window).load(function() {
		j$(".rd_' . $rport_rs . '.jcarousel ul").carouFredSel({
					responsive: true,
					width: "100%",
					scroll: 1,';
    if ($style !== 'cbp_type08') {
        echo 'prev: ".rd_' . $rport_rs . '.carousel_left",
					next: ".rd_' . $rport_rs . '.carousel_right",';
    } else {
        echo 'prev: ".rd_' . $rport_rs . '.rp_left",
					next: ".rd_' . $rport_rs . '.rp_right",';
    }
    echo 'auto: false,
					items: {
						width: 330,
						height: "100%",
					//	height: "30%",	//	optionally resize item-height
						visible: {
							min: 1,
							max: ' . $posts_per_line . '
						}
					}
				});
				});
	</script>';
    if ($style !== 'cbp_type08') {
        echo '<div class="rd_' . $rport_rs . ' jcarousel ' . $style . '"><div class="carousel_nav">
  <p class="rd_' . $rport_rs . ' carousel_left"></p>
  <p class="rd_' . $rport_rs . ' carousel_right"></p>
</div>';
    } elseif ($style == 'cbp_type08') {
        echo '<div class="cbp_' . $pos . '_desc ' . $style . '"><h2 class="cbp_title">' . $title . '</h2>
	<div class="rp_desc">' . $desc . '</div>
	<div class="rp_nav">
  <p class="rd_' . $rport_rs . ' rp_left"></p>
  <p class="rd_' . $rport_rs . ' rp_right"></p>
</div></div><div class="rd_' . $rport_rs . ' jcarousel ' . $style . ' cbp_' . $pos . '">';
    }
    echo '<ul>';
    $category_f = $category !== "all" ? $category : '';
    global $post;
    $i = 0;
    $args = array('post_type' => 'Portfolio', 'posts_per_page' => $to_show);
    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);
    if ($port_query->have_posts()) {
        while ($port_query->have_posts()) {
            $port_query->the_post();
            if (!isset($echoallterm)) {
                $echoallterm = '';
            }
            $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 .= strtolower($tempname) . " ";
                    $echoterm = $term->name;
                }
            }
            $linkToTheWork = get_permalink();
            $terms = get_the_terms($post->ID, 'tagportfolio');
            if ($terms && !is_wp_error($terms)) {
                $links = array();
                foreach ($terms as $term) {
                    $links[] = $term->name;
                }
                $links = str_replace(' ', '-', $links);
                $tax = join(" ", $links);
            } else {
                $tax = '';
            }
            if ($style !== 'cbp_type08') {
                ?>
<!-- portfolio item -->

<li class="carousel_recent_post prsc">
  <div class="recent_port_ctn">
    <div class="filter_img"><a href="<?php 
                the_permalink();
                ?>
" class="ico_link">
      <?php 
                the_post_thumbnail(array(586, 440), array('title' => ""));
                ?>
      </a>
      <?php 
                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='" . get_permalink($post->ID) . "' class='port_post_link'>";
                    echo "<span class='post_link'><h2 class='fw_port_link'>" . get_the_title() . "</h2><h3 class='fw_port_tag'>" . $echoallterm . "</h3>";
                    echo '';
                    echo "</span></a>";
                    echo "";
                }
                ?>
    </div>
<div class="port_details">
		<h2><a href="<?php 
                echo esc_url($linkToTheWork);
                ?>
"><?php 
                echo get_the_title();
                ?>
</a></h2>
		<h3><?php 
                echo esc_html($echoallterm);
                ?>
</h3>
        </div>
  </div>
</li>
<?php 
            } else {
                ?>

 <li class="carousel_recent_post brsc">
      <div class="recent_port_ctn <?php 
                echo 'rand' . $rport_rs . '_post';
                ?>
 ">
      <div class="blog_box">
<?php 
                the_post_thumbnail(array(540, 460), array('title' => ""));
                echo "";
                $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
                echo "<a class='blog_post_link_ctn' href='" . get_permalink($post->ID) . "'></a>";
                ?>

<div class="blog_box_content">
<h5 class="widget_post_title"> <a href="<?php 
                the_permalink();
                ?>
" rel="bookmark" title="<?php 
                printf(__('Permanent Link to %s', 'thefoxwp'), get_the_title());
                ?>
">
<?php 
                the_title();
                ?>
</a> </h5>
<div class="clearfix"></div>
<?php 
                echo rd_custom_excerpt('rd_bp_excerpt', 'rd_related_more');
                ?>
</div>
</div>
</div>
</li>

<?php 
            }
            unset($echoallterm);
        }
    }
    wp_reset_postdata();
    ?>
</ul>
</div>
<?php 
    $output_string = ob_get_contents();
    ob_end_clean();
    return '<div class="clearfix" style="padding-top:' . $margin_top . 'px"></div>' . $output_string . '<div class="clearfix" style="padding-top:' . $margin_bottom . 'px"></div>';
}
Esempio n. 5
0
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $number = $instance['number'];
        echo !empty($before_widget) ? $before_widget : '';
        ?>
 
	    <?php 
        if ($title) {
            echo !empty($before_title) ? $before_title : '';
        }
        echo !empty($title) ? $title : '';
        echo !empty($after_title) ? $after_title : '';
        ?>
          
                <ul class="rd_widget_recent_entries_f">
  					<?php 
        $query = new WP_Query();
        $query->query(array('posts_per_page' => $number, 'ignore_sticky_posts' => 1));
        ?>
                    <?php 
        if ($query->have_posts()) {
            while ($query->have_posts()) {
                $query->the_post();
                ?>
                    <li>                        
                    <?php 
                if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {
                    ?>
					<div class="thumbnail">
					<a title="<?php 
                    get_the_title();
                    ?>
" href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_post_thumbnail('staff_tn');
                    ?>
</a>
					</div>

					<?php 
                } else {
                    ?>
					<div class="thumbnail">
					</div>

					<?php 
                }
                ?>
					<div class="widget_recent_entry">
					<h4>
					<a href="<?php 
                the_permalink();
                ?>
" rel="bookmark" title="<?php 
                get_the_title();
                ?>
"> 
					<?php 
                the_title();
                ?>
					</a>
					</h4>
                    <div class="w_excerpt"><?php 
                rd_custom_excerpt('rd_widget_excerpt', 'rd_port_more');
                ?>
</div>
                    <div class="w_date"><?php 
                the_time('j F, Y');
                ?>
</div>	             			
                    </div>
	                </li>
                    <?php 
            }
        }
        ?>
                    <?php 
        wp_reset_postdata();
        ?>
                </ul>
		<?php 
        echo !empty($after_widget) ? $after_widget : '';
    }
function carousel_posts_sc($atts, $content = null)
{
    extract(shortcode_atts(array('margin_top' => '0', 'margin_bottom' => '0', 'to_show' => '5', 'posts_per_line' => '4', 'category' => 'all', 'show_tn' => 'yes', 'show_content' => '', 'bg_color' => '', 'h_color' => '', 't_color' => '', 'hover_color' => '', 'title' => 'Recent Posts', 'desc' => 'This is an awesome carousel to show your recent blog posts.', 'b_text' => '', 'b_link' => '', 'pos' => '', 'scroll' => '', 'speed' => '800', 'type' => 'cbp_type01'), $atts));
    ob_start();
    $rp_rs = RandomString(20);
    global $rd_data;
    $blog_rand_class = RandomString(20);
    if ($type == 'cbp_type01') {
        $hl_color = $rd_data['rd_content_hl_color'];
        $hover_color = $rd_data['rd_content_hover_color'];
        echo '<style>.rand' . $blog_rand_class . '_post .widget_post_title a,.rand' . $blog_rand_class . '_post .rp_date a,.rand' . $blog_rand_class . '_post .rp_date { color:#fff;}.rand' . $blog_rand_class . '_post .rp_date a,.rand' . $blog_rand_class . '_post .rp_date {padding-bottom:0; margin-bottom:0;}.rand' . $blog_rand_class . '_post .blog_box_content {position:absolute; bottom: 20px ;min-width: 100%; text-align: center;}.cbp_type01 .recent_port_ctn:hover .blog_box_content {bottom:85px;}.recent_port_ctn:hover .blog_img_link,.recent_port_ctn:hover .blog_post_link{bottom:35px}</style>';
    }
    if ($type == 'cbp_type02') {
        $hl_color = $rd_data['rd_content_hl_color'];
        $hover_color = $rd_data['rd_content_hover_color'];
        echo '<style>.rand' . $blog_rand_class . '_post .widget_post_title a,.rand' . $blog_rand_class . '_post .rp_date a,.rand' . $blog_rand_class . '_post .rp_date { color:#fff;}.rand' . $blog_rand_class . '_post .rp_date a,.rand' . $blog_rand_class . '_post .rp_date {padding-bottom:0; margin-bottom:0;}.rand' . $blog_rand_class . '_post .blog_box_content {position:absolute; bottom: 0px ;min-width: 100%; text-align: center;}.rand' . $blog_rand_class . '_post:hover .widget_post_title a{color:' . $hl_color . '}.rand' . $blog_rand_class . '_post a:hover{color:' . $hover_color . ' !important;}</style>';
    }
    if ($type == 'cbp_type03' || $type == 'cbp_type04' || $type == 'cbp_type07') {
        if ($h_color == '') {
            $h_color = $rd_data['rd_content_heading_color'];
        }
        if ($t_color == '') {
            $t_color = $rd_data['rd_content_text_color'];
        }
        if ($hover_color == '') {
            $hover_color = $rd_data['rd_content_hover_color'];
        }
        echo '<style>.rd_' . $rp_rs . ' .post-title h2 a{color:' . $h_color . ';}.rd_' . $rp_rs . ' .post-info,.rd_' . $rp_rs . ' .post-info a,.rd_' . $rp_rs . ' .entry{color:' . $t_color . ';}.rd_' . $rp_rs . ' .post-title h2 a:hover{color:' . $hover_color . ';}.rd_' . $rp_rs . ' .post-info a:hover,.rd_' . $rp_rs . ' .entry a:hover{color:' . $hover_color . ';}</style>';
    }
    if ($type == 'cbp_type05' || $type == 'cbp_type06' || $type == 'cbp_type08') {
        echo '<style>.rand' . $blog_rand_class . '_post .blog_box_content{background:' . $bg_color . '}</style>';
    }
    echo '
		<script type="text/javascript" charset="utf-8">
		var j$ = jQuery;
		j$.noConflict();
		"use strict";
	//setup up Carousel
		j$(window).load(function() {
		j$(".rd_' . $rp_rs . '.rp_sc ul").carouFredSel({
					responsive: true,
					width: "100%",
						height: "variable",';
    if ($scroll !== 'yes') {
        echo 'scroll: 1,
					auto: false,';
    } else {
        echo 'scroll:  { items:1,duration: ' . $speed . '},
					auto: true,';
    }
    if ($type == 'cbp_type04') {
        echo 'prev: ".rd_' . $rp_rs . '.related_left",
					next: ".rd_' . $rp_rs . '.related_right",';
    } else {
        echo 'prev: ".rd_' . $rp_rs . '.rp_left",
					next: ".rd_' . $rp_rs . '.rp_right",';
    }
    echo 'swipe       : {
             		   onTouch     : true,
		               onMouse     : false
        		    },
					items: {
						width: 330,
						height: "variable",
						visible: {
							min: 1,
							max: ' . $posts_per_line . '
						}
					}
				});
				});
	</script>';
    if ($type == 'cbp_type04') {
        echo '	<h2 class="single_related">' . $title . '</h2>
	<div class="related_nav ' . $type . '">
  <p class="rd_' . $rp_rs . ' related_left"></p>
  <p class="rd_' . $rp_rs . ' related_right"></p>
</div>';
    }
    if ($type == 'cbp_type05' || $type == 'cbp_type06' || $type == 'cbp_type08') {
        echo '<div class="cbp_' . $pos . '_desc ' . $type . '"><h2 class="cbp_title">' . $title . '</h2>
	<div class="rp_desc">' . $desc . '</div>
	<div class="rp_nav">
  <p class="rd_' . $rp_rs . ' rp_left"></p>
  <p class="rd_' . $rp_rs . ' rp_right"></p>
</div></div>';
    }
    echo '<div class="rd_' . $rp_rs . ' rp_sc ' . $type . ' ';
    if ($type == 'cbp_type01' || $type == 'cbp_type02') {
        echo 'clearfix';
    }
    if ($type == 'cbp_type05' || $type == 'cbp_type06' || $type == 'cbp_type08') {
        echo 'cbp_' . $pos . ' ';
    }
    echo '">';
    if ($type == 'cbp_type01' || $type == 'cbp_type02' || $type == 'cbp_type03') {
        echo '<div class="rp_nav">
  <p class="rd_' . $rp_rs . ' rp_left"></p>
  <p class="rd_' . $rp_rs . ' rp_right"></p>
</div>';
    }
    echo '<ul>';
    $category_f = $category !== "all" ? $category : '';
    global $post;
    $query = new WP_Query();
    $i = 0;
    if ($category_f !== '') {
        $query->query(array('post_type' => 'Post', 'category_name' => $category_f, 'posts_per_page' => $to_show, 'post_status' => 'publish'));
    } else {
        $query->query(array('post_type' => 'Post', 'post_status' => 'publish', 'posts_per_page' => $to_show));
    }
    if ($query->have_posts()) {
        while ($query->have_posts()) {
            $query->the_post();
            if ($type == 'cbp_type03' || $type == 'cbp_type04' || $type == 'cbp_type07') {
                ?>

 <li class="blog_related_post brsc">
      
     <div class="post">

<?php 
                if (get_the_post_thumbnail()) {
                    echo "<div class='post-attachement'>";
                    if ($type !== 'cbp_type07') {
                        echo the_post_thumbnail(array(600, 490));
                    } else {
                        echo the_post_thumbnail(array(586, 440));
                    }
                    echo "</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 
                if ($type !== 'cbp_type07') {
                    echo rd_custom_excerpt('rd_rp_excerpt', 'rd_related_more');
                } else {
                    echo rd_custom_excerpt('rd_rp_excerpt', 'rd_port_more');
                }
                ?>
    </div>   
    <!-- .entry END --> 
     </div>
	</div>
	<!-- .post-content END--> 
	<!-- .post END -->
      </li>

<?php 
            } else {
                ?>

      <li class="carousel_recent_post brsc">
      <div class="recent_port_ctn <?php 
                echo 'rand' . $blog_rand_class . '_post';
                ?>
 ">
      <div class="blog_box">
<?php 
                if ($type == 'cbp_type01') {
                    the_post_thumbnail(array(768, 1000), array('title' => ""));
                }
                if ($type == 'cbp_type02') {
                    the_post_thumbnail(array(768, 560), array('title' => ""));
                }
                if ($type == 'cbp_type05' || $type == 'cbp_type08') {
                    the_post_thumbnail(array(540, 460), array('title' => ""));
                }
                if ($type == 'cbp_type06') {
                    the_post_thumbnail(array(540, 400), array('title' => ""));
                }
                echo "";
                $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
                if ($type == 'cbp_type01') {
                    echo '<a href="' . $image[0] . '" class="prettyPhoto blog_img_link_ctn">';
                    echo "<span class='blog_img_link'>";
                    echo '';
                    echo "</span></a><a class='blog_post_link_ctn' href='" . get_permalink($post->ID) . "'>";
                    echo "<span class='blog_post_link'>";
                    echo '';
                    echo "</span></a>";
                    echo "";
                }
                if ($type == 'cbp_type05' || $type == 'cbp_type06' || $type == 'cbp_type08') {
                    echo "<a class='blog_post_link_ctn' href='" . get_permalink($post->ID) . "'></a>";
                }
                ?>

<div class="blog_box_content">
<h5 class="widget_post_title"> <a href="<?php 
                the_permalink();
                ?>
" rel="bookmark" title="<?php 
                printf(__('Permanent Link to %s', 'thefoxwp'), get_the_title());
                ?>
">
<?php 
                the_title();
                ?>
</a> </h5>
<div class="clearfix"></div>

<?php 
                if ($type == 'cbp_type01') {
                    ?>
<p class="rp_date" ><?php 
                    the_category(',');
                    ?>
 / <?php 
                    the_time(get_option('date_format'));
                    ?>
</p>
<?php 
                }
                if ($type == 'cbp_type02') {
                    ?>
<p class="rp_date" ><?php 
                    the_time(get_option('date_format'));
                    ?>
 | <?php 
                    the_category(',');
                    ?>
</p>
<?php 
                }
                ?>



<?php 
                if ($type !== 'cbp_type01' && $type !== 'cbp_type02') {
                    ?>

      <?php 
                    echo rd_custom_excerpt('rd_bp_excerpt', 'rd_related_more');
                    ?>

<?php 
                }
                ?>

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

<?php 
            }
        }
    }
    wp_reset_postdata();
    ?>



</ul>

</div>

<?php 
    $output_string = ob_get_contents();
    ob_end_clean();
    return '<div class="clearfix" style="padding-top:' . $margin_top . 'px"></div>' . $output_string . '<div class="clearfix" style="padding-top:' . $margin_bottom . 'px"></div>';
}
    <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 
                echo rd_custom_excerpt('rd_related_excerpt', 'rd_related_more');
                ?>
    </div>   
    <!-- .entry END --> 
     </div>
	</div>
	<!-- .post-content END--> 
	<!-- .post END -->
      </li>

      <?php 
            }
        }
        ?>

      <?php 
Esempio n. 8
0
function blog_slide_sc($atts, $content = null)
{
    extract(shortcode_atts(array('margin_top' => '0', 'margin_bottom' => '0', 'to_show' => '1000', 'posts_per_line' => '4', 'category' => 'all', 'show_tn' => 'yes', 'show_content' => '', 'bg_color' => '', 'title' => '', 'desc' => '', 'type' => ''), $atts));
    ob_start();
    $rp_rs = RandomString(20);
    global $rd_data;
    $hl_color = $rd_data['rd_content_hl_color'];
    $hover_color = $rd_data['rd_content_hover_color'];
    echo '
		<script type="text/javascript" charset="utf-8">
		var j$ = jQuery;
		j$.noConflict();
		"use strict";
	//setup up Carousel
		j$(window).load(function() {
		j$(".' . $rp_rs . '.slide_sc ul").carouFredSel({
					responsive: true,
					width: "100%",
        				height: "variable",
        			scroll : { fx : "crossfade" },
					prev: ".' . $rp_rs . '.sp_left",
					next: ".' . $rp_rs . '.sp_right",	
					auto: false,
					items: {
						width: 570,
        				height: "variable",
						visible: {
							min: 1,
							max: 1
						}
					}
				});
				});
	</script>';
    echo '<div class="' . $rp_rs . ' slide_sc ' . $type . '">';
    echo '<ul>';
    $category_f = $category !== "all" ? $category : '';
    global $post;
    $query = new WP_Query();
    $i = 0;
    if ($category_f !== '') {
        $query->query(array('post_type' => 'Post', 'category_name' => $category_f, 'posts_per_page' => $to_show, 'post_status' => 'publish'));
    } else {
        $query->query(array('post_type' => 'Post', 'post_status' => 'publish', 'posts_per_page' => $to_show));
    }
    if ($query->have_posts()) {
        while ($query->have_posts()) {
            $query->the_post();
            ?>

 <li class="slide_post">
      

<?php 
            if ($type == '') {
                echo the_post_thumbnail(array(570, 420));
            } elseif ($type == 'rd_alt_slide') {
                echo the_post_thumbnail(array(570, 545));
            } elseif ($type == 'rd_squared_slide') {
                echo the_post_thumbnail('portfolio_squared');
            }
            ?>
  <div class="slide_post_info"> 
      <h2><a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            the_title();
            ?>
">
        <?php 
            the_title();
            ?>
        </a></h2>
      <?php 
            if ($type == '') {
                echo rd_custom_excerpt('rd_rp_excerpt', 'rd_port_more');
            } elseif ($type == 'rd_alt_slide') {
                echo rd_custom_excerpt('rd_staff_excerpt', 'rd_port_more');
            } else {
            }
            ?>
<h3 class="sp_date" ><?php 
            the_time(get_option('date_format'));
            ?>
</h3>
<div class="rp_nav">
<?php 
            echo '<div class="' . $rp_rs . ' sp_left"></div><div class="' . $rp_rs . ' sp_right"></div>';
            ?>
</div>

     </div>
	  </li>




<?php 
        }
    }
    wp_reset_postdata();
    ?>



</ul>

</div>

<?php 
    $output_string = ob_get_contents();
    ob_end_clean();
    return '<div class="clearfix" style="padding-top:' . $margin_top . 'px"></div>' . $output_string . '<div class="clearfix" style="padding-top:' . $margin_bottom . 'px"></div>';
}
Esempio n. 9
0
    function get_blog_posts()
    {
        $html_template = $_POST['html_template'];
        $column = $_POST['column'];
        $tn_size = $_POST['tn_size'];
        $now_open_works = $_POST['now_open_works'];
        $works_per_load = $_POST['works_per_load'];
        $first_load = $_POST['first_load'];
        $category = $_POST['category'] !== "all" ? $_POST['category'] : '';
        if ($now_open_works == 0) {
            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=1');
            } else {
                query_posts('posts_per_page=1');
            }
            global $more, $post;
            $more = 0;
            while (have_posts()) {
                the_post();
                $archive_month = get_the_time('M');
                $archive_year = get_the_time('Y');
                $current_month = $archive_month . ' ' . $archive_year;
            }
        } else {
            $last_post = $now_open_works - 1;
            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('offset=' . $last_post . '&category_name=' . $category . '&posts_per_page=1');
            } else {
                query_posts('offset=' . $last_post . '&posts_per_page=1');
            }
            global $more, $post;
            $more = 0;
            while (have_posts()) {
                the_post();
                $archive_month = get_the_time('M');
                $archive_year = get_the_time('Y');
                $current_month = $archive_month . ' ' . $archive_year;
            }
        }
        global $post;
        global $rd_data;
        $temp = isset($wp_query) ? $wp_query : '';
        $wp_query = null;
        $wp_query = new WP_Query();
        $args = array('post_type' => 'post', 'order' => 'DESC', 'offset' => $now_open_works, 'posts_per_page' => $works_per_load, 'post_status' => 'publish');
        if ($category !== '' && $category !== "all") {
            $args['category_name'] = $category;
        }
        $wp_query->query($args);
        $i = 1;
        $last_month = '';
        while ($wp_query->have_posts()) {
            $wp_query->the_post();
            $pf = get_post_format();
            $archive_month = get_the_time('M');
            $archive_year = get_the_time('Y');
            $current_post_month = $archive_month . ' ' . $archive_year;
            $linkToTheWork = get_permalink();
            $target = "";
            #START Recent posts Type 01
            if ($html_template == "type01") {
                ?>

<div class=" rp_<?php 
                echo esc_attr($html_template);
                ?>
 ajax_post <?php 
                echo esc_attr($column);
                ?>
 "><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
  <?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);
                echo "<div class='post-attachement'>";
                echo the_post_thumbnail(array(340, 400));
                if ($post_format == '') {
                    echo "<div class='rp_normal'></div>";
                } elseif ($post_format == 'gallery') {
                    echo "<div class='rp_gallery'></div>";
                } elseif ($post_format == 'image') {
                    echo "<div class='rp_image'></div>";
                } elseif ($post_format == 'quote') {
                    echo "<div class='rp_quote'></div>";
                } elseif ($post_format == 'audio') {
                    echo "<div class='rp_audio'></div>";
                } elseif ($post_format == 'video') {
                    echo "<div class='rp_video'></div>";
                }
                echo "</div>";
                ?>
  </a>
  <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="rp_post_info">
      <div class="rp_post_time">
        <?php 
                the_time('j F Y');
                ?>
      </div>
      <div class="rp_post_comment">
        <?php 
                comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                ?>
      </div>
      <div class="rp_post_cat">
        <?php 
                the_category(',');
                ?>
      </div>
    </div>
    
    <!-- post-info END--> 
    
  </div>
  <!-- post-content END--> 
</div>
<!-- post END -->

<?php 
            }
            #END Recent posts Type 01
            #START Recent posts Type 02
            if ($html_template == "type02") {
                ?>
<div class="rp_<?php 
                echo esc_attr($html_template);
                ?>
 ajax_post <?php 
                echo esc_attr($column);
                ?>
 "><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
  <?php 
                echo "<div class='post-attachement'>";
                echo the_post_thumbnail(array(340, 306));
                ?>
 
  <div class="rp_post_time">
    <?php 
                echo get_the_time('d M');
                ?>
  </div>
  </a></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--> 
    
    <!-- .entry --> 
    <div class="rp_entry">
	<?php 
                echo rd_custom_excerpt('rd_staff2_excerpt', 'rd_port_more');
                ?>
    </div>
    <!-- .entry END --> 
    
    <!-- post-info -->
    <div class="rp_post_info"><?php 
                comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                ?>
  /  <?php 
                the_category(',');
                ?>
  /  <a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
"><?php 
                echo __('Read More', 'thefoxwp');
                ?>
</a></div>

    <!-- post-info END--> 
  </div>
  <!-- post-content END--> 

<!-- post END -->

<?php 
            }
            #END Recent posts Type 02
            #START Recent posts Type 03
            if ($html_template == "type03") {
                ?>
<div class="rp_<?php 
                echo esc_attr($html_template);
                ?>
 ajax_post <?php 
                echo esc_attr($column);
                ?>
 "><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
  <?php 
                echo "<div class='post-attachement'>";
                echo the_post_thumbnail('staff_tn');
                ?>
 
   <?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 == '') {
                    echo "<div class='rp_normal'></div>";
                } elseif ($post_format == 'gallery') {
                    echo "<div class='rp_gallery'></div>";
                } elseif ($post_format == 'image') {
                    echo "<div class='rp_image'></div>";
                } elseif ($post_format == 'quote') {
                    echo "<div class='rp_quote'></div>";
                } elseif ($post_format == 'audio') {
                    echo "<div class='rp_audio'></div>";
                } elseif ($post_format == 'video') {
                    echo "<div class='rp_video'></div>";
                }
                ?>
  <div class="rp_post_time">
    <span class="rp_day"><?php 
                echo get_the_time('d');
                ?>
</span>
    <span class="rp_month"><?php 
                echo get_the_time('M');
                ?>
</span>
  </div>
  </a></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--> 
    
    <!-- .entry --> 
    <div class="rp_entry">
	<?php 
                echo rd_custom_excerpt('rd_staff2_excerpt', 'rd_port_more');
                ?>
    </div>
    <!-- .entry END --> 
    

  </div>
  <!-- post-content END-->
      <!-- post-info -->
    <div class="rp_post_info"><?php 
                comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                ?>
  /  <?php 
                the_category(',');
                ?>
  /  <a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
"><?php 
                echo __('Read More', 'thefoxwp');
                ?>
</a></div>
    <!-- post-info END-->  

<!-- post END -->

<?php 
            }
            #END Recent posts Type 03
            #START Recent posts Type 04
            if ($html_template == "type04") {
                ?>

<div class="rp_<?php 
                echo esc_attr($html_template);
                ?>
 ajax_post <?php 
                echo esc_attr($column);
                ?>
 "><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
  <?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);
                echo "<div class='post-attachement'>";
                echo the_post_thumbnail('staff_tn');
                if ($post_format == '') {
                    echo "<div class='rp_normal'></div>";
                } elseif ($post_format == 'gallery') {
                    echo "<div class='rp_gallery'></div>";
                } elseif ($post_format == 'image') {
                    echo "<div class='rp_image'></div>";
                } elseif ($post_format == 'quote') {
                    echo "<div class='rp_quote'></div>";
                } elseif ($post_format == 'audio') {
                    echo "<div class='rp_audio'></div>";
                } elseif ($post_format == 'video') {
                    echo "<div class='rp_video'></div>";
                }
                echo "</div>";
                ?>
  </a>
  <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="rp_post_info"><?php 
                the_time('j F Y');
                ?>
   |   <?php 
                the_category(',');
                ?>
   |   <?php 
                the_author();
                ?>
</div>

    </div>
    <!-- post-info END--> 
    
    <!-- .entry --> 
    <div class="rp_entry">
	<?php 
                echo rd_custom_excerpt('rd_related_excerpt', 'rd_port_more');
                ?>
    </div>
    <!-- .entry END -->  
 
  </div>
   <!-- post-content END--> 

<!-- post END -->

<?php 
            }
            #END Recent posts Type 04
            #START Recent posts Type 05
            if ($html_template == "type05") {
                ?>
<div class="rp_<?php 
                echo esc_attr($html_template);
                ?>
 ajax_post <?php 
                echo esc_attr($column);
                ?>
 "><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
  <?php 
                echo "<div class='post-attachement'>";
                echo the_post_thumbnail('staff_tn');
                ?>
 
   <?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 == '') {
                    echo "<div class='rp_normal'></div>";
                } elseif ($post_format == 'gallery') {
                    echo "<div class='rp_gallery'></div>";
                } elseif ($post_format == 'image') {
                    echo "<div class='rp_image'></div>";
                } elseif ($post_format == 'quote') {
                    echo "<div class='rp_quote'></div>";
                } elseif ($post_format == 'audio') {
                    echo "<div class='rp_audio'></div>";
                } elseif ($post_format == 'video') {
                    echo "<div class='rp_video'></div>";
                }
                ?>
  </a></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--> 
    
    <!-- .entry --> 
    <div class="rp_entry">
	<?php 
                echo rd_custom_excerpt('rd_rp_excerpt', 'rd_port_more');
                ?>
    </div>
    <!-- .entry END --> 
    

  </div>
  <!-- post-content END-->
      <!-- post-info -->
    <div class="rp_post_info">
      <div class="rp_post_cat"><?php 
                the_category(',');
                ?>
</div>
      <div class="rp_post_author"><?php 
                the_author();
                ?>
</div>
      <div class="rp_post_time"><?php 
                the_time('j F Y');
                ?>
</div>
    </div>
    <!-- post-info END-->  

<!-- post END -->

<?php 
            }
            #END Recent posts Type 05
            #START Recent posts Type 06
            if ($html_template == "type06") {
                ?>
<div class="rp_<?php 
                echo esc_attr($html_template);
                ?>
 ajax_post <?php 
                echo esc_attr($column);
                ?>
 "><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
  <?php 
                echo "<div class='post-attachement'>";
                echo the_post_thumbnail('staff_tn');
                ?>
</a></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 -->
    <div class="rp_post_info">
      <div class="rp_post_time"><?php 
                the_time('j F Y');
                ?>
</div>
    </div>
<!-- post-info END-->  
    

  </div>
  <!-- post-content END-->
    
<!-- post END -->

<?php 
            }
            #END Recent posts Type 06
            #START Recent posts Type 07
            if ($html_template == "type07") {
                ?>
<div class="rp_<?php 
                echo esc_attr($html_template);
                ?>
 ajax_post <?php 
                echo esc_attr($column);
                ?>
 "><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
  <?php 
                echo "<div class='post-attachement'>";
                echo the_post_thumbnail('staff_tn');
                ?>
  <div class="rp_post_time">
    <span class="rp_day"><?php 
                echo get_the_time('d');
                ?>
</span>
    <span class="rp_month"><?php 
                echo get_the_time('M');
                ?>
</span>
  </div>
  </a></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--> 
    
    <!-- .entry --> 
    <div class="rp_entry">
	<?php 
                echo rd_custom_excerpt('rd_staff2_excerpt', 'rd_port_more');
                ?>
    </div>
    <!-- .entry END --> 
    

      <!-- post-info -->
    <div class="rp_post_info"><?php 
                comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                ?>
</div>
    <!-- post-info END-->  

  </div>
  <!-- post-content END-->

<!-- post END -->

<?php 
            }
            #END Recent posts Type 07
            #START Recent posts Type 08
            if ($html_template == "type08") {
                ?>
<div class="rp_<?php 
                echo esc_attr($html_template);
                ?>
 ajax_post <?php 
                echo esc_attr($column);
                ?>
 "><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
  <?php 
                echo "<div class='post-attachement'>";
                echo the_post_thumbnail('portfolio_squared');
                ?>
 
  <div class="rp_post_time">
    <span class="rp_day"><?php 
                echo get_the_time('d');
                ?>
</span>
    <span class="rp_month"><?php 
                echo get_the_time('M');
                ?>
</span>
  </div>
  </a></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--> 

  </div>
  <!-- post-content END-->
  
 <!-- post-info -->
    <div class="rp_post_info"><span class="rp_post_comment"><?php 
                comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                ?>
</span><span class="rp_post_more"><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
"><?php 
                echo __('Read More', 'thefoxwp');
                ?>
</a></span>
    </div>
    <!-- post-info END-->  


<!-- post END -->

<?php 
            }
            #END Recent posts Type 08
            #START Recent posts Type 09
            if ($html_template == "type09") {
                ?>
<div class="rp_<?php 
                echo esc_attr($html_template);
                ?>
 ajax_post <?php 
                echo esc_attr($column);
                ?>
 "><div class='post-attachement'>

  <?php 
                echo the_post_thumbnail(array(740, 690));
                ?>
 <a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
 <div class="rp_arrow">
 </div>
 
  </a>
 <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>
    <div class="rp_post_info"><?php 
                comments_popup_link(__('0 comment', 'thefoxwp'), __('1  comment', 'thefoxwp'), __('% comments', 'thefoxwp'), 'comments-link', __('Comments are Closed', 'thefoxwp'));
                ?>
  /  <?php 
                the_category(',');
                ?>
  /  <a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
"><?php 
                echo __('Read More', 'thefoxwp');
                ?>
</a></div>
  <!-- .title END--> 
    
    <!-- .entry --> 
    <div class="rp_entry">
	<?php 
                echo rd_custom_excerpt('rd_staff2_excerpt', 'rd_port_more');
                ?>
    </div>
    <!-- .entry END --> 
    
    <!-- post-info -->
   
    <!-- post-info END--> 
  </div>
  <!-- post-content END--> 
 
 
  </div>
 
</div>
<!-- post END -->

<?php 
            }
            #END Recent posts Type 09
            #START Recent posts Type 10
            if ($html_template == "type10") {
                ?>
<div class="rp_<?php 
                echo esc_attr($html_template);
                ?>
 ajax_post <?php 
                echo esc_attr($column);
                ?>
 ">
<div class="rp_left_info">

 <?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 == '') {
                    echo "<div class='rp_normal'></div>";
                } elseif ($post_format == 'gallery') {
                    echo "<div class='rp_gallery'></div>";
                } elseif ($post_format == 'image') {
                    echo "<div class='rp_image'></div>";
                } elseif ($post_format == 'quote') {
                    echo "<div class='rp_quote'></div>";
                } elseif ($post_format == 'audio') {
                    echo "<div class='rp_audio'></div>";
                } elseif ($post_format == 'video') {
                    echo "<div class='rp_video'></div>";
                }
                ?>
<div class="rp_avatar">
  
<?php 
                if (function_exists('get_avatar')) {
                    echo get_avatar(get_the_author_meta('email'), 80);
                }
                ?>
</div>
<div class="rp_like"><?php 
                if (function_exists('zilla_likes')) {
                    echo do_shortcode('[zilla_likes]');
                }
                ?>
</div>

  <div class="rp_post_time">
    <span class="rp_day"><?php 
                echo get_the_time('d');
                ?>
</span>
    <span class="rp_month"><?php 
                echo get_the_time('M');
                ?>
</span>
  </div>
 </div>




<a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
  <?php 
                echo "<div class='post-attachement'>";
                echo the_post_thumbnail(array(520, 388));
                ?>
  </a></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 -->
    <div class="rp_post_info"><?php 
                the_category(',');
                ?>
</div>
    <!-- post-info END-->  
    
    <!-- .entry --> 
    <div class="rp_entry">
	<?php 
                echo rd_custom_excerpt('rd_staff2_excerpt', 'rd_port_more');
                ?>
    </div>
    <!-- .entry END --> 
    


  </div>
  <!-- post-content END-->

<!-- post END -->

<?php 
            }
            #END Recent posts Type 10
            #Normal
            if ($html_template == "type1") {
                ?>
<div class="post ajax_post">
  <?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>';
                } 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 == '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">By <?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 : '';
                    } else {
                        the_content(__('Read more', 'thefoxwp'));
                    }
                    ?>
    </div>
    
    <!-- .entry END --> 
    
  </div>
  <!-- .post-content END--> 
</div>

<!-- .post END -->

<?php 
                }
            }
            #END Normal Blog
            #Standard trending
            if ($html_template == "type7") {
                ?>
<div class="post ajax_post">
<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>';
                } 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 == '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>";
                        } 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 "";
                            }
                        } elseif ($post_format == 'video' && $my_video !== '') {
                            echo "<div class='post-attachement'>" . $my_video . "</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="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 
                }
            }
            #END Standard trending
            #Multi Author
            if ($html_template == "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 ($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>';
                } 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 == '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">By <?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 
                }
            }
            #END Multi Author Blog
            #Grid
            if ($html_template == "type4") {
                ?>
<div class="post ajax_post grid_blog_post  <?php 
                echo esc_attr($column);
                ?>
 ">
  <?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) . '">';
                        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">By <?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>
  
  <!-- .post-content END--> 
</div>

<!-- .post END -->

<?php 
            }
            #END Grid Blog
            #Grid Trending
            if ($html_template == "type6") {
                ?>
<div class="post ajax_post grid_trend_blog_post  <?php 
                echo esc_attr($column);
                ?>
 ">
<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);
                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) . '">';
                    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 
            }
            #END Grid Blog
            #TimeLine
            if ($html_template == "type2") {
                ?>
<div class="ajax_post post_masonry post_timeline ">
  <?php 
                if ($now_open_works == 0) {
                    echo '<div class="timeline_month month_left">' . $current_post_month . '</div><div class="timeline_month month_right">' . $current_post_month . '</div>';
                } elseif ($last_month == '' && $current_month !== $current_post_month) {
                    echo '<div class="timeline_month month_left">' . $current_post_month . '</div><div class="timeline_month month_right">' . $current_post_month . '</div>';
                } elseif ($current_post_month !== $last_month && $last_month !== '') {
                    echo '<div class="timeline_month month_left">' . $current_post_month . '</div><div class="timeline_month month_right">' . $current_post_month . '</div>';
                }
                $post_date = get_the_time('d M');
                ?>
  <div class="arrow_l"></div>
  <div class="arrow_r"></div>
  <div class="timeline_pd_l"><?php 
                echo !empty($post_date) ? $post_date : '';
                ?>
</div>
  <div class="timeline_pd_r"><?php 
                echo !empty($post_date) ? $post_date : '';
                ?>
</div>
  <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">';
                        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 == '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">';
                                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>";
                        }
                    }
                }
                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">By <?php 
                    the_author();
                    ?>
    |    <?php 
                    the_category(',');
                    ?>
</div>
    
    <!-- post-info END--> 
    
    <!-- .entry -->
    
    <div class="entry">
      <?php 
                    the_excerpt();
                    ?>
    </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_time"><?php 
                the_time('j F Y');
                ?>
    |    </span><span class="info_like"><?php 
                if (function_exists('zilla_likes')) {
                    echo do_shortcode('[zilla_likes]');
                }
                ?>
</span></div>
  </div>
  
  <!-- .post-content END--> 
  
</div>

<!-- .post END -->

<?php 
            }
            #END TimeLine
            #Masonry
            if ($html_template == "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">By <?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>
  
  <!-- .post-content END--> 
  
</div>

<!-- .post END -->

<?php 
            }
            #END Masonry
            $now_open_works = 1;
            $last_month = $current_post_month;
            $i++;
            unset($echoallterm, $pf);
        }
        die;
    }