Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @Theme Name : Quality-Pro
- * @file : index-portfolio.php
- * @package : Quality-Pro
- * @author : Hari Maliya
- * @license : license.txt
- * @filesource : wp-content/themes/quality/index-portfolio.php
- */
- ?>
- <!-- AddThis Button END -->
- <div class="qua_portfolio_carusel">
- <div class="container">
- <?php $quality_pro_options=theme_data_setup();
- $current_options = wp_parse_args( get_option( 'quality_pro_options', array() ), $quality_pro_options ); ?>
- <div class="qua_port_title">
- <?php if($current_options['portfolio_title']) { ?>
- <h1><?php echo $current_options['portfolio_title']; ?></h1>
- <?php } ?>
- <?php if($current_options['portfolio_description']) { ?>
- <p><?php echo $current_options['portfolio_description']; ?></p>
- <?php } ?>
- <div class="qua-separator" id=""></div>
- </div>
- <div class="row home_portfolio_row">
- <?php
- $j=1;
- $total_portfolio= $current_options['portfolio_list'];
- $args = array( 'post_type' => 'quality_portfolio','posts_per_page' =>$total_portfolio);
- $portfolio = new WP_Query( $args );
- if( $portfolio->have_posts() )
- { while ( $portfolio->have_posts() ) : $portfolio->the_post();
- if(get_post_meta( get_the_ID(),'meta_project_link', true ))
- { $meta_project_link=get_post_meta( get_the_ID(),'meta_project_link', true ); }
- else { $meta_project_link = get_post_permalink(); }
- ?>
- <div class="col-md-4 col-sm-6 qua_col_padding">
- <div class="qua_portfolio_image">
- <?php $class = "img-responsive" ;
- if(has_post_thumbnail()):
- the_post_thumbnail('', $class);
- $post_thumbnail_id = get_post_thumbnail_id();
- $post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id );
- ?>
- <div class="qua_home_portfolio_showcase_overlay">
- <div class="qua_home_portfolio_showcase_overlay_inner">
- <div class="qua_home_portfolio_showcase_icons">
- <a href="<?php echo $post_thumbnail_url; ?>" data-lightbox="image" title="<?php the_title(); ?>" class="hover_thumb"><i class="fa fa-plus"></i></a>
- </div>
- </div>
- </div>
- <?php endif; ?>
- </div>
- <div class="qua_home_portfolio_caption">
- <a href="<?php echo $meta_project_link; ?>" <?php if(get_post_meta( get_the_ID(),'meta_project_target', true )) { echo "target='_blank'"; } ?>><?php the_title(); ?></a>
- </div>
- </div>
- <?php if($j%3==0){ echo "<div class='clearfix'></div>"; } $j++; endwhile;
- } else {
- for($i=1; $i<=4; $i++) { ?>
- <div class="col-md-3 col-sm-6 qua_col_padding">
- <div class="qua_portfolio_image">
- <img class="img-responsive" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/portfolio/home-port<?php echo $i; ?>.jpg" />
- <div class="qua_home_portfolio_showcase_overlay">
- <div class="qua_home_portfolio_showcase_overlay_inner">
- <div class="qua_home_portfolio_showcase_icons">
- <a href="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/portfolio/home-port<?php echo $i; ?>.jpg" data-lightbox="image" title="Quality Portfolio" class="hover_thumb"><i class="fa fa-plus"></i></a>
- </div>
- </div>
- </div>
- </div>
- <div class="qua_home_portfolio_caption">
- <a href="#"><?php _e('Grow Creativity','quality'); ?></a>
- </div>
- </div>
- <?php } } //end of default portfolio for loop ?>
- </div>
- <?php
- if ($current_options['portfolio_view_all_btn_enabled']==true)
- { if($current_options['portfolio_more_text'])
- { ?>
- <div class="qua_proejct_button">
- <a href="<?php if($current_options['portfolio_more_link'] !='') { echo $current_options['portfolio_more_link']; } ?>" <?php if($current_options['portfolio_more_lnik_target'] ==true) { echo "target='_blank'"; } ?>> <?php echo $current_options['portfolio_more_text']; ?> </a>
- </div><?php
- }
- }
- ?>
- </div>
- </div>
- <!-- /Quality Portfolio Section ---->
Add Comment
Please, Sign In to add comment