lundi 2 mai 2016

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

    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



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire