Guest User

Untitled

a guest
Jul 9th, 2018
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 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. $mySpecialProjectsIds=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' => $mySpecialProjectsIds
  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. ?>
  69. <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'"; } ?> >
  70.  
  71. <?php the_post_thumbnail( ); ?>
  72. </a>
  73. <?php
  74. $post_thumbnail_id = get_post_thumbnail_id();
  75. $post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id );
  76. }
  77. ?>
  78.  
  79. </figure>
  80. <div class="portfolio-info">
  81. <div class="entry-header">
  82. <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>
  83. </div>
  84. <div class="entry-content">
  85. <p><?php echo get_post_meta( get_the_ID(),'project_title_description', true ); ?></p>
  86. </div>
  87. </div>
  88. </aside>
  89. </div>
  90. <?php if($k%4==0){ echo '<div class="clearfix"></div>' ; } $k++; endwhile; ?>
  91. </div>
  92. <!--</div>-->
  93. <?php } wp_reset_query(); $busiprof_in++; ?>
  94. </div>
  95. <?php // } ?>
  96. </div>
  97. </section>
  98. <!-- End of Portfolio Section -->
  99. <div class="clearfix"></div>
  100. <?php } ?>
Add Comment
Please, Sign In to add comment