Guest User

Untitled

a guest
May 5th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | None | 0 0
  1. <?php
  2. /**
  3. * @Theme Name : Rambopro
  4. * @file : index-project.php
  5. * @package : Busiprof
  6. * @author : Hari Maliya
  7. * @license : license.txt
  8. * @filesource : wp-content/themes/rambopro/index-project.php
  9. */
  10. $rambo_pro_theme_options = theme_data_setup();
  11. $current_options = wp_parse_args( get_option( 'rambo_pro_theme_options', array() ), $rambo_pro_theme_options );
  12. if($current_options['project_protfolio_enabled']==true)
  13. {
  14. ?>
  15. <!-- Recent Work Section -->
  16. <div class="portfolio_main_content">
  17. <div class="container">
  18. <div class="row-fluid featured_port_title">
  19. <h1><?php if($current_options['project_protfolio_tag_line']!='') { echo $current_options['project_protfolio_tag_line']; } else { echo _e('Featured Portfolio Projects','rambo'); } ?></h1>
  20. <p> <?php if($current_options['project_protfolio_description_tag']!='') { echo $current_options['project_protfolio_description_tag']; } else { echo _e('Maecenas sit amet tincidunt elit. Pellentesque habitant morbi tristique senectus et netus et Nulla facilisi.','rambo'); } ?></p>
  21. </div>
  22. <div class="row">
  23. <?php $j=1;
  24. $total_project = $current_options['project_list'];
  25. $args = array( 'post_type' => 'rambopro_project','posts_per_page' => $total_project);
  26. $rambopro_project = new WP_Query( $args );
  27. if( $rambopro_project->have_posts() )
  28. {
  29. while ( $rambopro_project->have_posts() ) : $rambopro_project->the_post();
  30. ?>
  31. <div class="span4 featured_port_projects">
  32. <div class="thumbnail">
  33. <?php if(has_post_thumbnail()):?>
  34. <?php the_post_thumbnail(); ?>
  35. <?php endif;?>
  36. <?php if(get_post_meta( get_the_ID(),'portfolio_project_link', true ))
  37. { $portfolio_project_link=get_post_meta( get_the_ID(),'portfolio_project_link', true ); }
  38. else { $portfolio_project_link = get_post_permalink(); }
  39. ?>
  40. <div class="featured_service_content">
  41. <h3><a href="<?php echo $portfolio_project_link; ?>" <?php if(get_post_meta( get_the_ID(),'portfolio_project_target', true )) { echo "target='_blank'"; } ?> ><?php echo the_title(); ?></a></h3>
  42. <p><?php echo substr(get_the_excerpt(), 0,100)." ..."; ?></p>
  43. <p><a class="featured_port_projects_btn pull-right" href="<?php echo $portfolio_project_link; ?>" <?php if(get_post_meta( get_the_ID(),'portfolio_project_target', true )) { echo "target='_blank'"; } ?> ><?php _e('Read More','rambopro')?></a></p>
  44. </div>
  45. </div>
  46. </div>
  47. <?php if($j%3==0){ echo "<div class='clearfix'></div>"; } $j++; endwhile;
  48. } else
  49. { for($i=1; $i<=4; $i++) { ?>
  50. <div class="span3 featured_port_projects">
  51. <div class="thumbnail">
  52. <img src="<?php echo get_template_directory_uri () ?>/images/default/projects/project<?php echo $i; ?>.png">
  53. <div class="featured_service_content">
  54. <h3><a href="#"><?php _e('One More Works','rambo'); ?></a></h3>
  55. <p><?php _e('Donec id elit non mi porta gravida at eget metus. Fusce dapibus, justo sit amet risus etiam porta sem.','rambo');?></p>
  56. <p><a class="featured_port_projects_btn pull-right" href="#"><?php _e('Read More','rambo'); ?></a></p>
  57. </div>
  58. </div>
  59. </div>
  60. <?php } }?>
  61. </div>
  62. </div>
  63. </div>
  64. <?php } ?>
  65. <!-- /Recent Work Section -->
Add Comment
Please, Sign In to add comment