Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $appointment_options = theme_setup_data();
- $project_setting = wp_parse_args(get_option('appointment_options', array()), $appointment_options);
- if ($project_setting['portfolio_section_enabled'] == 0) {
- ?>
- <!-- Portfolio Section -->
- <style>
- .portfolio-area:hover .portfolio-showcase-overlay {
- visibility: visible !important;
- opacity: 0;
- }
- .portfolio-area:hover img {
- -webkit-transform: scale(1) !important;
- -moz-transform: scale(1) !important;
- -ms-transform: scale(1) !important;
- -o-transform: scale(1) !important;
- transform: scale(1) !important;
- }
- </style>
- <div class="portfolio-section">
- <div class="container">
- <!-- Section Title -->
- <div class="row">
- <div class="col-md-12">
- <div class="section-heading-title">
- <h1><?php echo $project_setting['portfolio_title']; ?></h1>
- <p class="section-description"><?php echo $project_setting['portfolio_description']; ?></p>
- </div>
- </div>
- </div>
- <!-- /Section Title -->
- <div class="col-md-12">
- <div class="carousel slide" data-ride="carousel" data-type="multi" data-interval="3000" id="newCarousel">
- <div class="carousel-inner">
- <?php
- $post_type = 'appoint_portfolio';
- $args = array(
- 'post_type' => $post_type,
- 'tax_query' => array(
- array(
- 'taxonomy' => 'portfolio_categories',
- 'field' => 'id',
- 'terms' => $project_setting['portfolio_selected_category_id'],
- //'operator' => 'NOT IN',
- ),
- ),
- 'posts_per_page' => $project_setting['portfolio_list'],
- 'post_status' => 'publish');
- $j = 1;
- $portfolio_query = null;
- $portfolio_query = new WP_Query($args);
- if ($portfolio_query->have_posts()) {
- while ($portfolio_query->have_posts()) : $portfolio_query->the_post();
- $project_description = sanitize_text_field(get_post_meta(get_the_ID(), 'project_description', true));
- $project_more_btn_link = sanitize_text_field(get_post_meta(get_the_ID(), 'project_more_btn_link', true));
- $project_link_chkbx = sanitize_text_field(get_post_meta(get_the_ID(), 'project_link_chkbx', true));
- ?>
- <div class="item <?php if ($j == 1) {
- echo "active";
- $j++;
- } ?>">
- <div class="col-md-4 col-sm-6 col-xs-12 pull-left portfolio-area">
- <div class="portfolio-image">
- <?php
- if (has_post_thumbnail()) {
- $class = array('class' => 'img-responsive');
- the_post_thumbnail('', $class);
- $post_thumbnail_id = get_post_thumbnail_id();
- $post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id);
- }
- ?>
- <?php if (!empty($project_more_btn_link)) { ?><a href="<?php echo $project_more_btn_link; ?>"target="_blank"><?php } ?>
- <div class="portfolio-showcase-overlay">
- </div>
- <?php if (!empty($project_more_btn_link)) { ?></a><?php } ?>
- </div>
- <div class="portfolio-caption">
- <h4><?php if (!empty($project_more_btn_link)) { ?>
- <a href="<?php echo $project_more_btn_link; ?>" <?php if (!empty($project_link_chkbx)) {
- echo 'target="_blank"';
- } ?> class="hover_thumb"><?php the_title(); ?></a>
- <?php } else the_title(); ?></h4>
- <?php if (get_post_meta(get_the_ID(), 'project_description', true)) {
- ?>
- <p><?php echo get_post_meta(get_the_ID(), 'project_description', true); ?></p>
- <?php } ?>
- </div>
- </div></div>
- <?php $j++;
- endwhile;
- } ?>
- </div>
- <!-- Project Scroll -->
- <div class="row">
- <?php if ($j > 3) { ?>
- <div class="col-md-12">
- <ul class="project-scroll-btn">
- <li><a class="project-prev" href="#newCarousel" data-slide="prev"></a></li>
- <li><a class="project-next" href="#newCarousel" data-slide="next"></a></li>
- </ul>
- </div>
- <?php } ?>
- </div>
- <!-- /Project Scroll -->
- </div>
- </div>
- </div></div>
- <!-- /Portfolio Section -->
- <div class="clearfix"></div>
- <?php } ?>
Add Comment
Please, Sign In to add comment