Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. <!--Dealers-list-->
  2. <section class="inner_pages">
  3. <div class="container">
  4.  
  5. <div class="dealers_list_wrap">
  6. <?php
  7.  
  8. // Modify get_posts args for your needs
  9. $job_details = get_posts( array ( 'post_type' => 'awsm_job_openings' ) );
  10.  
  11. if ( $job_details )
  12. {
  13.  
  14. foreach ( $job_details as $job ) { ?>
  15. <?php $company = get_post_meta( $job->ID, 'company', true ); ?>
  16.  
  17. <?php $location = get_post_meta( $job->ID, 'ajo_loc', true ); ?>
  18. <?php $website = get_post_meta( $job->ID, 'website', true ); ?>
  19.  
  20.  
  21. <div class="dealers_listing">
  22. <div class="row">
  23. <?php echo the_title(); ?>
  24.  
  25. <div class="col-sm-3 col-xs-4">
  26. <div class="dealer_info">
  27. <h5><a href="#"><?php echo the_title(); ?></a></h5>
  28. <p> <?php echo $website ; ?><br>
  29. </p>
  30. </div>
  31. </div>
  32.  
  33.  
  34.  
  35. </div>
  36. </div>
  37. <?php } } ?>
  38. </div>
  39. </div>
  40. </section>
  41. <!--/Dealers-list-->
  42.  
  43. <?php
  44. return ob_get_clean();
  45. }
  46.  
  47. function ajo_job_listings()
  48.  
  49.  
  50.  
  51. {
  52. $args = array(
  53. 'post_type' => 'awsm_job_openings',
  54. 'post_status' => 'publish'
  55. );
  56.  
  57.  
  58. $query = new WP_Query( $args );
  59. if( $query->have_posts() ){
  60.  
  61. while( $query->have_posts() ){
  62. $query->the_post();
  63. ?>
  64.  
  65. <li><a href="#post-<?php echo the_ID(); ?>"><?php the_title(); ?></a></li>
  66. <?php }
  67.  
  68. }
  69. wp_reset_postdata();
  70. return $data;
  71. }
  72.  
  73.  
  74. public function ajo_job_opening_scripts_and_styles()
  75. {
  76. //Name of style sheet "it must be unique" and the path of the stylesheet.....
  77. wp_enqueue_style( 'ajo_job_opening_sheets', plugins_url( 'job-openings/assets/css/bootstrap.min.css' ) );
  78. wp_enqueue_style( 'ajo_job_opening_sheets2', plugins_url( 'job-openings/assets/css/style.css' ) );
  79. wp_enqueue_style( 'ajo_job_opening-bootstrap', plugins_url( 'assets/js/bootstrap.min.js', __FILE__), array('jquery'), '', true );
  80.  
  81. }
  82.  
  83.  
  84. public function ajo_job_opening_title( $post = null ) {
  85. if ( $job_title = ajo_display_title( $post ) ) {
  86. echo $job_title;
  87. }
  88. }
  89.  
  90.  
  91.  
  92. }//Class closed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement