global $term, $portfolio_default_page_id, $paged, $thumbnail_size, $page_columns; // get the taxonomy slug $slug = get_query_var('term'); // get the current taxonomy_id $term = get_term_by('slug', $slug, 'portfolio-cats'); get_header(); // get page layout $layout = roen_get_page_layout($portfolio_default_page_id); $layout_class = roen_get_page_layout_class($portfolio_default_page_id); $sidebar_name = penguin_get_post_meta_key('sidebar-type', $portfolio_default_page_id); $page_columns = intval(penguin_get_post_meta_key('page-posts-cols', $portfolio_default_page_id)); $page_item_style = intval(penguin_get_post_meta_key('portfolio-show-style', $portfolio_default_page_id)) + 1; $page_image_no_crop = penguin_get_post_meta_key('page-posts-img-no-crop', $portfolio_default_page_id); $page_items_no_space = penguin_get_post_meta_key('page-posts-img-no-space', $portfolio_default_page_id); $page_columns_class = roen_get_element_columns(intval($page_columns)); $thumbnail_size = roen_get_thumbnail_size(intval($page_columns), $page_image_no_crop); ?> <div id="main" class="container"> <div class="row"> <section class="<?php echo $layout == 1 ? 'col-md-12 col-sm-12' : 'roen-col col-lg-9 col-md-8 col-sm-8 roen-' . $layout_class; ?> "> <div class="portfolio-main-area"> <section class="portfolio-container <?php echo $page_items_no_space == 'on' ? 'portfolio-no-space' : 'row'; ?> portfolio-isotope"> <?php if (have_posts()) {
function roen_portfolio_scroll_list_func($atts, $content = null) { global $portfolio_shortcode_content, $portfolio_shortcode_thumbnail_size; extract(shortcode_atts(array('number' => '8', 'columns' => '4', 'type' => '', 'style' => '1', 'orderby' => '', 'cat__in' => '', 'post__in' => '', 'post__not_in' => '', 'nocrop' => '', 'effect' => '', 'space' => 'yes', 'position' => 'side'), $atts)); $output = ""; $portfolios = penguin_get_custom_post_posts($type, $number, $orderby, $cat__in, '', $post__in, $post__not_in); if ($portfolios != "" && $portfolios->have_posts()) { $portfolio_shortcode_thumbnail_size = roen_get_thumbnail_size(intval($columns) - 2, $nocrop); if ($effect != "" && $effect != "none") { $output .= '<div class="roen-shortcode-scroll-post roen-shortcode-portfolio-post row animate-list' . ($space == 'yes' ? '' : ' no-space') . '" data-columns="' . esc_attr($columns) . '">'; } else { $output .= '<div class="roen-shortcode-scroll-post roen-shortcode-portfolio-post row' . ($space == 'yes' ? '' : ' no-space') . '" data-columns="' . esc_attr($columns) . '">'; } if ($position == 'top') { $output .= '<div class="roen-shortcode-scroll-nav top"><a href="#" class="roen-shortcode-scroll-prev disalbed"><i class="fa fa-chevron-left"></i></a><a href="#" class="roen-shortcode-scroll-next disalbed"><i class="fa fa-chevron-right"></i></a></div>'; } $output .= '<div class="roen-shortcode-scroll-container"><div class="roen-shortcode-scroll-post-list">'; while ($portfolios->have_posts()) { $portfolios->the_post(); $portfolio_shortcode_content = ""; if ($effect != "" && $effect != "none") { $output .= '<article id="post-' . get_the_ID() . '" class="' . implode(' ', get_post_class('shortcode-post-entry portfolio-element portfolio-style-' . esc_attr($style))) . ' animate-item" data-effect="' . esc_attr($effect) . '" itemscope itemtype="http://schema.org/CreativeWork">'; } else { $output .= '<article id="post-' . get_the_ID() . '" class="' . implode(' ', get_post_class('shortcode-post-entry portfolio-element portfolio-style-' . esc_attr($style))) . '" itemscope itemtype="http://schema.org/CreativeWork">'; } get_template_part('template/portfolio/shortcode/content-style', esc_attr($style)); $output .= $portfolio_shortcode_content; $output .= '</article>'; } $output .= '</div></div>'; if ($position != 'top') { $output .= '<div class="roen-shortcode-scroll-nav ' . ($position == 'side' ? 'side' : 'bottom') . '"><a href="#" class="roen-shortcode-scroll-prev disalbed"><i class="fa fa-chevron-left"></i></a><a href="#" class="roen-shortcode-scroll-next disalbed"><i class="fa fa-chevron-right"></i></a></div>'; } $output .= '</div>'; } wp_reset_postdata(); return $output; }