'; ascend_breadcrumbs(); echo ''; } } } add_action( 'ascend_single_portfolio_content_after', 'ascend_wp_link_pages', 10 ); function ascend_portfolio_nav() { global $post; $ascend = ascend_get_options(); if(isset($ascend['portfolio_single_nav']) && $ascend['portfolio_single_nav'] == 1) { echo '
'; echo '
'; $prev_post = get_adjacent_post(false, null, true); if ( !empty( $prev_post ) ) : echo ''; endif; if(isset($ascend['portfolio_link_type']) && $ascend['portfolio_link_type'] == 'type') { $main_term = ''; if(class_exists('WPSEO_Primary_Term')) { $WPSEO_term = new WPSEO_Primary_Term('portfolio-type', $post->ID); $WPSEO_term = $WPSEO_term->get_primary_term(); $WPSEO_term = get_term($WPSEO_term); if (is_wp_error($WPSEO_term)) { if ( $terms = wp_get_post_terms( $post->ID, 'portfolio-type', array( 'orderby' => 'parent', 'order' => 'DESC' ) ) ) { $main_term = $terms[0]; } } else { $main_term = $WPSEO_term; } } elseif ( $terms = wp_get_post_terms( $post->ID, 'portfolio-type', array( 'orderby' => 'parent', 'order' => 'DESC' ) ) ) { $main_term = $terms[0]; } if ( $main_term ) { echo ''; } } else if(isset($ascend['portfolio_link_type']) && $ascend['portfolio_link_type'] == 'page') { $parent_id = $ascend['portfolio_link']; if( !empty($parent_id)) { echo ''; } } $next_post = get_adjacent_post(false, null, false); if ( !empty( $next_post ) ) : echo ''; endif; echo '
'; echo '
'; } } add_action( 'ascend_single_portfolio_footer', 'ascend_portfolio_nav', 20 ); function ascend_portfolio_bottom_carousel() { global $post; $ascend = ascend_get_options(); $portfolio_carousel = get_post_meta( $post->ID, '_kad_portfolio_carousel', true ); if (empty($portfolio_carousel) || $portfolio_carousel == 'default') { if(isset($ascend['portfolio_bottom_carousel']) && $ascend['portfolio_bottom_carousel'] != 'none') { get_template_part('templates/content', 'single-portfolio-bottom-carousel'); } } else if($portfolio_carousel != 'none'){ get_template_part('templates/content', 'single-portfolio-bottom-carousel'); } } add_action( 'ascend_single_portfolio_after', 'ascend_portfolio_bottom_carousel', 30 ); function ascend_portfolio_comments() { $ascend = ascend_get_options(); if(isset($ascend['portfolio_comments']) && $ascend['portfolio_comments'] == 1) { comments_template('/templates/comments.php'); } } add_action( 'ascend_single_portfolio_after', 'ascend_portfolio_comments', 40 ); add_filter( 'ascend_single_portfolio_image_height', 'ascend_portfolio_single_image_height', 10 ); function ascend_portfolio_single_image_height() { $ascend = ascend_get_options(); if(isset($ascend['portfolio_header_single_image_height']) && $ascend['portfolio_header_single_image_height'] == 1 ) { return null; } else { return 450; } } function ascend_portfolio_single_layout() { global $post; $layout = get_post_meta( $post->ID, '_kad_ppost_layout', true ); if(empty($layout) || $layout == 'default') { $ascend = ascend_get_options(); if(isset($ascend['project_layout_default'])) { $layout = $ascend['project_layout_default']; } else { $layout = 'beside'; } } return $layout; } function ascend_portfolio_slider_width() { $layout = ascend_portfolio_single_layout(); $maxwidth = ascend_max_width(); if( $layout == 'above' || $layout == 'three'){ if($maxwidth == 'none') { $width = 1800; } else if($maxwidth == '940') { $width = 940; } else if($maxwidth == '1470') { $width = 1440; } else if($maxwidth == '1770') { $width = 1740; } else { $width = 1140; } } else if( $layout == 'besidesmall') { if($maxwidth == 'none') { $width = 1400; } else if($maxwidth == '940') { $width = 620; } else if($maxwidth == '1470') { $width = 960; } else if($maxwidth == '1770') { $width = 1170; } else { $width = 780; } } else { if($maxwidth == 'none') { $width = 1400; } else if($maxwidth == '940') { $width = 520; } else if($maxwidth == '1470') { $width = 840; } else if($maxwidth == '1770') { $width = 1040; } else { $width = 660; } } return $width; } function ascend_portfolio_single_project_output() { get_template_part('templates/content', 'single-portfolio-project'); } add_action( 'ascend_single_portfolio_project', 'ascend_portfolio_single_project_output', 20 );