WP Job Manager: Different list style to featured jobs

There is some way how to display featured jobs in a grid list view and other as list view?

I tried to do multiple queries at class-wp-job-manager-ajax.php

Read More
    if ( $jobs->have_posts() ) : $result['found_jobs'] = true; ?>
        <?php while ( $jobs->have_posts() ) : $jobs->the_post(); ?>
            <?php 
                $email = get_the_author_meta('user_email');
                $id = get_the_author_meta('ID');
                if ( woocommerce_customer_bought_product( $email, $id, 1013) || woocommerce_customer_bought_product( $email, $id, 1017) ) {
                    get_job_manager_template_part( 'content', 'job_listing-premium' ); 
                }
            ?>
        <?php endwhile; ?>


        <?php while ( $jobs->have_posts() ) : $jobs->the_post(); ?>
            <?php 
                $email = get_the_author_meta('user_email');
                $id = get_the_author_meta('ID');
                    get_job_manager_template_part( 'content', 'job_listing' ); 
            ?>
        <?php endwhile; ?>

    <?php else : ?>
        <?php get_job_manager_template_part( 'content', 'no-jobs-found' ); ?>
    <?php endif;

But my premium list view comes with erro style and without ID name like others.

Someone already tried to do something like that?

Thanks! =D

Related posts

1 comment

  1. In the ajax-filters.js put the code below at the end of functions who load the list of jobs.

        $('.style-grid').addClass('style-list');
        $('.style-grid').removeClass('col-sm-6');
        $('.style-grid').removeClass('style-grid');
        $('.job_position_featured').removeClass('style-list');
        $('.job_position_featured').addClass('style-grid');
        $('.job_position_featured').addClass('col-sm-6');
    

Comments are closed.