akhlesh_nagar

Untitled

Feb 27th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.87 KB | None | 0 0
  1. <?php
  2. /**
  3. * @Theme Name : Quality-Pro
  4. * @file : index-portfolio.php
  5. * @package : Quality-Pro
  6. * @author : Hari Maliya
  7. * @license : license.txt
  8. * @filesource : wp-content/themes/quality/index-portfolio.php
  9. */
  10. ?>
  11. <!-- AddThis Button END -->
  12. <div class="qua_portfolio_carusel">
  13. <div class="container">
  14. <?php $quality_pro_options=theme_data_setup();
  15. $current_options = wp_parse_args( get_option( 'quality_pro_options', array() ), $quality_pro_options ); ?>
  16. <div class="qua_port_title">
  17. <?php if($current_options['portfolio_title']) { ?>
  18. <h1><?php echo $current_options['portfolio_title']; ?></h1>
  19. <?php } ?>
  20. <?php if($current_options['portfolio_description']) { ?>
  21. <p><?php echo $current_options['portfolio_description']; ?></p>
  22. <?php } ?>
  23. <div class="qua-separator" id=""></div>
  24. </div>
  25. <div class="row home_portfolio_row">
  26. <?php
  27. $j=1;
  28. $total_portfolio= $current_options['portfolio_list'];
  29. $args = array( 'post_type' => 'quality_portfolio','posts_per_page' =>$total_portfolio);
  30. $portfolio = new WP_Query( $args );
  31. if( $portfolio->have_posts() )
  32. { while ( $portfolio->have_posts() ) : $portfolio->the_post();
  33. if(get_post_meta( get_the_ID(),'meta_project_link', true ))
  34. { $meta_project_link=get_post_meta( get_the_ID(),'meta_project_link', true ); }
  35. else { $meta_project_link = get_post_permalink(); }
  36. ?>
  37. <div class="col-md-4 col-sm-6 qua_col_padding">
  38. <div class="qua_portfolio_image">
  39. <?php $class = "img-responsive" ;
  40. if(has_post_thumbnail()):
  41. the_post_thumbnail('', $class);
  42. $post_thumbnail_id = get_post_thumbnail_id();
  43. $post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id );
  44. ?>
  45. <div class="qua_home_portfolio_showcase_overlay">
  46. <div class="qua_home_portfolio_showcase_overlay_inner">
  47. <div class="qua_home_portfolio_showcase_icons">
  48. <a href="<?php echo $post_thumbnail_url; ?>" data-lightbox="image" title="<?php the_title(); ?>" class="hover_thumb"><i class="fa fa-plus"></i></a>
  49. </div>
  50. </div>
  51. </div>
  52. <?php endif; ?>
  53. </div>
  54. <div class="qua_home_portfolio_caption">
  55. <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>
  56. </div>
  57. </div>
  58. <?php if($j%3==0){ echo "<div class='clearfix'></div>"; } $j++; endwhile;
  59. } else {
  60. for($i=1; $i<=4; $i++) { ?>
  61. <div class="col-md-3 col-sm-6 qua_col_padding">
  62. <div class="qua_portfolio_image">
  63. <img class="img-responsive" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/portfolio/home-port<?php echo $i; ?>.jpg" />
  64. <div class="qua_home_portfolio_showcase_overlay">
  65. <div class="qua_home_portfolio_showcase_overlay_inner">
  66. <div class="qua_home_portfolio_showcase_icons">
  67. <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>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="qua_home_portfolio_caption">
  73. <a href="#"><?php _e('Grow Creativity','quality'); ?></a>
  74. </div>
  75. </div>
  76. <?php } } //end of default portfolio for loop ?>
  77. </div>
  78. <?php
  79. if ($current_options['portfolio_view_all_btn_enabled']==true)
  80. { if($current_options['portfolio_more_text'])
  81. { ?>
  82. <div class="qua_proejct_button">
  83. <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>
  84. </div><?php
  85. }
  86. }
  87. ?>
  88. </div>
  89. </div>
  90. <!-- /Quality Portfolio Section ---->
Add Comment
Please, Sign In to add comment