| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?php
- /**
- * Single portfolio template
- *
- * @package vamtam/consulting
- */
- if ( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && 'XMLHttpRequest' === $_SERVER['HTTP_X_REQUESTED_WITH'] && have_posts() ) :
- the_post();
- if ( function_exists( 'sharing_add_header' ) ) {
- sharing_add_header();
- }
- FLBuilder::enqueue_layout_styles_scripts();
- extract( vamtam_get_portfolio_options() );
- ?>
- <h1 class="ajax-portfolio-title textcenter"><?php the_title() ?></h1>
- <article id="post-<?php the_ID(); ?>" <?php post_class( 'full ' . $type ); ?>>
- <div class="page-content">
- <?php include locate_template( 'single-jetpack-portfolio-content.php' ); ?>
- </div>
- </article>
- <?php
- if ( function_exists( 'sharing_add_footer' ) ) {
- sharing_add_footer();
- }
- print_late_styles();
- ?>
- <script> try { twttr.widgets.load(); } catch(e) {} </script>
- <?php
- exit;
- endif;
- get_header();
- ?>
- <div class="row page-wrapper">
- <?php VamtamTemplates::$in_page_wrapper = true; ?>
- <?php
- if ( have_posts() ) :
- while ( have_posts() ) : the_post();
- ?>
- <?php
- extract( vamtam_get_portfolio_options() );
- list( $terms_slug, $terms_name, $terms_id ) = vamtam_get_portfolio_terms();
- ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class( VamtamTemplates::get_layout() . ' ' . $type ); ?>>
- <div class="page-content">
- <?php include locate_template( 'single-jetpack-portfolio-content.php' ); ?>
- <?php comments_template(); ?>
- </div>
- </article>
- <?php endwhile ?>
- <?php endif ?>
- <?php get_template_part( 'sidebar' ) ?>
- </div>
- <?php if ( ( rd_vamtam_get_optionb( 'show-related-portfolios' ) || is_customize_preview() ) && class_exists( 'VamtamProjectsModule' ) ) : ?>
- <?php if ( ! class_exists( 'Vamtam_Elements_B' ) || Vamtam_Elements_B::had_limit_wrapper() ) : ?>
- </div>
- <?php endif ?>
- <?php
- $related_query = new WP_Query( array(
- 'post_type' => Jetpack_Portfolio::CUSTOM_POST_TYPE,
- 'posts_per_page' => 1,
- 'post__not_in' => array( get_the_ID() ),
- 'tax_query' => array(
- array(
- 'taxonomy' => 'jetpack-portfolio-type',
- 'field' => 'id',
- 'terms' => $terms_id,
- ),
- ),
- ) );
- if ( intval( $related_query->found_posts ) > 0 ) :
- ?>
- <div class="related-portfolios row vamtam-related-content" <?php VamtamTemplates::display_none( rd_vamtam_get_optionb( 'show-related-portfolios' ) ) ?>>
- <div class="clearfix limit-wrapper vamtam-box-outer-padding">
- <?php echo wp_kses_post( apply_filters( 'vamtam_related_portfolios_title', '<h5 class="related-content-title">' . rd_vamtam_get_option( 'related-portfolios-title' ) . '</h5>' ) ); ?>
- <?php
- FLBuilder::render_module_html( 'vamtam-projects', array(
- 'column' => 4,
- 'tax_jetpack-portfolio-type' => implode( ',', $terms_id ),
- 'ids' => '',
- 'max' => 8,
- 'height' => 400,
- 'show_title' => 'below',
- 'description' => 'false',
- 'more' => esc_html__( 'View', 'vamtam-consulting' ),
- 'nopaging' => 'true',
- 'group' => 'true',
- 'layout' => 'scrollable',
- 'posts_jetpack-portfolio' => get_the_ID(),
- 'posts_jetpack-portfolio_matching' => 0,
- 'hover_animation' => 'hover-animation-2',
- ) );
- ?>
- </div>
- </div>
- <?php endif ?>
- <?php if ( ! class_exists( 'Vamtam_Elements_B' ) || Vamtam_Elements_B::had_limit_wrapper() ) : ?>
- <div class="limit-wrapper">
- <?php endif ?>
- <?php endif ?>
- <?php get_footer();
|