Guest User

Untitled

a guest
Jul 6th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. <?php
  2.  
  3. // Hi, @bluebaron just change the below project IDS 18, 19, and so on, and keep add more if needed but using seperaction comma{,}
  4. $my_selected_projects=array(
  5. 18,
  6. 19,
  7. 20,
  8. 17,
  9. );
  10. // Hi, @bluebaron just change the above project IDS 18, 19, and so on, and keep add more if needed
  11.  
  12. $current_options = wp_parse_args( get_option( 'busiprof_pro_theme_options', array() ), theme_data_setup() );
  13. if( $current_options['home_project_section_enabled'] == 'on' ) {
  14.  
  15. ?>
  16. <!-- Portfolio Section -->
  17. <section id="section" class="portfolio bg-color">
  18. <div class="container">
  19. <!-- Section Title -->
  20. <div class="row">
  21. <div class="col-md-12">
  22. <div class="section-title">
  23. <h1 class="section-heading"><?php echo $current_options['project_tag_line'];?></h1>
  24. <?php if( $current_options['project_tag_desciption'] != '' ) {?>
  25. <p><?php echo $current_options['project_tag_desciption']; ?></p>
  26. <?php } ?>
  27. </div>
  28. </div>
  29. </div>
  30. <!-- /Section Title -->
  31.  
  32. <!-- Portfolio Tabs -->
  33. <?php
  34. //for a given post type, return all
  35. $post_type = 'busiprof_project';
  36. $tax = 'project_categories';
  37. // $tax_terms = get_terms($tax);
  38. // echo '<pre>';print_r($tax_terms);echo '</pre>';die('\n\nprinted');
  39. //echo $defualt_tex_id = get_option('custom_texoid_busiprof');
  40. $busiprof_active=1;
  41. // if ($tax_terms) { ?>
  42. <!-- /Portfolio Tabs -->
  43. <div class="tab-content main-portfolio-section" id="myTabContent">
  44. <?php $busiprof_in=1;
  45.  
  46. $args=array(
  47. 'post_type' => $post_type,
  48. // "$tax" => $tax_term->slug,
  49. 'post_status' => 'publish',
  50. 'posts_per_page' => -1 ,
  51. 'post__in' => $my_selected_projects
  52. );
  53. $home_project_query = null;
  54. $home_project_query = new WP_Query($args);
  55. if( $home_project_query->have_posts() )
  56. {
  57. ?>
  58. <!-- Portfolio Item -->
  59. <!--<div id="<?php echo $tax_term->slug; ?>" class="tab-pane fade <?php if($busiprof_in == 1) echo "in active" ; ?>">-->
  60. <div class="row">
  61. <?php $k=1;
  62. while ($home_project_query->have_posts()) : $home_project_query->the_post(); ?>
  63. <div class="col-md-3 col-sm-6 col-xs-12">
  64. <aside class="post">
  65. <figure class="post-thumbnail">
  66. <?php if(has_post_thumbnail())
  67. {
  68. the_post_thumbnail( );
  69. $post_thumbnail_id = get_post_thumbnail_id();
  70. $post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id );
  71. }
  72. ?>
  73. <div class="thumbnail-showcase-overlay">
  74. <div class="thumbnail-showcase-overlay-inner">
  75. <div class="thumbnail-showcase-icons">
  76. <?php if(isset($post_thumbnail_url)){ ?>
  77. <a href="<?php echo $post_thumbnail_url; ?>" data-lightbox="image" title="<?php the_title(); ?>" class="hover_thumb"><i class="fa fa-search"></i></a>
  78. <?php } ?>
  79. </div>
  80. </div>
  81. </div>
  82. </figure>
  83. <div class="portfolio-info">
  84. <div class="entry-header">
  85. <h4 class="entry-title"><a href="<?php echo get_post_meta( get_the_ID(),'project_link', true ); ?>" <?php if(get_post_meta( get_the_ID(),'project_target', true )) { echo "target='_blank'"; } ?> > <?php the_title(); ?></a></h4>
  86. </div>
  87. <div class="entry-content">
  88. <p><?php echo get_post_meta( get_the_ID(),'project_title_description', true ); ?></p>
  89. </div>
  90. </div>
  91. </aside>
  92. </div>
  93. <?php if($k%4==0){ echo '<div class="clearfix"></div>' ; } $k++; endwhile; ?>
  94. </div>
  95. <!--</div>-->
  96. <?php } wp_reset_query(); $busiprof_in++; ?>
  97. </div>
  98. <?php // } ?>
  99. </div>
  100. </section>
  101. <!-- End of Portfolio Section -->
  102. <div class="clearfix"></div>
  103. <?php } ?>
Add Comment
Please, Sign In to add comment