akhlesh_nagar

Untitled

Feb 18th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.92 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' =>1);
  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-3 "></div>
  38. <div class="col-md-6 col-sm-6 qua_col_padding">
  39. <div class="qua_portfolio_image">
  40. <?php $class = "img-responsive" ;
  41. if(has_post_thumbnail()):
  42. the_post_thumbnail('', $class);
  43. $post_thumbnail_id = get_post_thumbnail_id();
  44. $post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id );
  45. ?>
  46. <div class="qua_home_portfolio_showcase_overlay">
  47. <div class="qua_home_portfolio_showcase_overlay_inner">
  48. <div class="qua_home_portfolio_showcase_icons">
  49. <a href="<?php echo $post_thumbnail_url; ?>" data-lightbox="image" title="<?php the_title(); ?>" class="hover_thumb"><i class="fa fa-plus"></i></a>
  50. </div>
  51. </div>
  52. </div>
  53. <?php endif; ?>
  54. </div>
  55. <div class="qua_home_portfolio_caption">
  56. <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>
  57. </div>
  58. </div>
  59. <div class="col-md-3 "></div>
  60. <?php if($j%1==0){ echo "<div class='clearfix'></div>"; } $j++; endwhile;
  61. } else {
  62. for($i=1; $i<=4; $i++) { ?>
  63. <div class="col-md-3 col-sm-6 qua_col_padding">
  64. <div class="qua_portfolio_image">
  65. <img class="img-responsive" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/portfolio/home-port<?php echo $i; ?>.jpg" />
  66. <div class="qua_home_portfolio_showcase_overlay">
  67. <div class="qua_home_portfolio_showcase_overlay_inner">
  68. <div class="qua_home_portfolio_showcase_icons">
  69. <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>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="qua_home_portfolio_caption">
  75. <a href="#"><?php _e('Grow Creativity','quality'); ?></a>
  76. </div>
  77. </div>
  78. <?php } } //end of default portfolio for loop ?>
  79. </div>
  80. <?php
  81. if ($current_options['portfolio_view_all_btn_enabled']==true)
  82. { if($current_options['portfolio_more_text'])
  83. { ?>
  84. <div class="qua_proejct_button">
  85. <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>
  86. </div><?php
  87. }
  88. }
  89. ?>
  90. </div>
  91. </div>
  92. <!-- /Quality Portfolio Section ---->
Add Comment
Please, Sign In to add comment