Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $jobs = new WP_Query(array(
- 'post_type' => 'job',
- 'meta_query' => array(
- array(
- 'key' => 'company_id',
- 'value' => array(get_the_ID()),
- 'compare' => 'IN',
- )
- ),
- 'orderby' => 'date',
- 'order' => 'desc',
- 'posts_per_page' => -1,
- ));
- ?>
- <div <?php post_class('item company-item'); ?>>
- <div class="row">
- <div class="col-md-2 hidden-sm hidden-xs">
- <div class="img-item">
- <?php the_post_thumbnail('large') ?>
- </div>
- </div>
- <div class="col-md-10">
- <h3 class="no-margin-top">
- <a href="<?php the_permalink(); ?>">
- <?php the_title(); ?> <i class="fa fa-link color-white-mute font-1x"></i>
- </a>
- </h3>
- <p class="text-truncate "><?php the_excerpt(); ?></p>
- <div>
- <?php if($jobs->found_posts) : ?>
- <a href="<?php the_permalink(); ?>#cp-jobs">
- <?php printf ( _n ( 'Available Job', '%1$s Available Jobs', $jobs->found_posts, 'jobplanet-plugin' ) , number_format_i18n( $jobs->found_posts ) ) ; ?>
- </a>
- –
- <?php endif; ?>
- <?php
- if(is_user_logged_in() && current_user_can( 'applicant' )) :
- $user_id = get_current_user_id();
- $follow_company = get_user_meta($user_id, 'follow_company');
- if($follow_company !== '' && in_array(get_the_ID(), $follow_company)) {
- ?>
- <a href="#" data-follow="1" data-id="<?php the_ID(); ?>" class="btn btn-xs btn-theme btn-success follow-company">
- <?php _e('Follow Company', 'jobplanet-plugin'); ?>
- </a>
- <?php
- } else {
- ?>
- <a href="#" data-follow="0" data-id="<?php the_ID(); ?>" class="btn btn-xs btn-theme btn-default follow-company">
- <?php _e('Follow Company', 'jobplanet-plugin'); ?>
- </a>
- <?php
- }
- endif;
- ?>
- </div>
- </div>
- </div>
- </div><!-- end item listing -->
Add Comment
Please, Sign In to add comment