Title: Problem to filter articles
Last modified: April 2, 2024

---

# Problem to filter articles

 *  Resolved [sbrakni](https://wordpress.org/support/users/sbrakni/)
 * (@sbrakni)
 * [2 years ago](https://wordpress.org/support/topic/problem-to-filter-articles/)
 * Hello,
 * I have a website where WP Job Manager is installed to show job offers, recently
   we wanted to sync our job board on WordPress with our Jobaffinity which is a 
   service that publishes job offers on different websites for you.
 * For this to happen, we created a user in our wordpress for Jobaffinity that can
   publish articles.
 * What we need to do is create a template that loops on Articles and selects only
   the ones posted by Jobaffinity to show them on WP Job Manager, problem is that
   we don’t know what post_type to put in our code, and if in the end WP Job Manager
   posts are considered as article or not?
 * Here is the code we put in our template:
 *     ```wp-block-code
       <?php
       /*
        * Template Name: Jobaffinity Job Listings
        */
   
       get_header();
   
       // Remplacez '293' par l'ID réel de l'utilisateur Jobaffinity, si nécessaire.
       $author_id = '293';
   
       // Préparez la requête pour les offres d'emploi
       $args = array(
           'post_type' => 'job_application', // Spécifiez le type de publication personnalisé de WP Job Manager
           'author' => $author_id,       // Filtre par ID d'auteur, si nécessaire
           'posts_per_page' => -1        // -1 pour afficher tous les posts. Ajustez selon le besoin.
       );
   
       $job_query = new WP_Query($args);
   
       if ($job_query->have_posts()) : 
           while ($job_query->have_posts()) : $job_query->the_post();
               // Affichez ici le contenu de chaque offre d'emploi
               // Par exemple, le titre et un lien vers l'offre complète
               echo '<h2><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
               the_excerpt(); // Affiche un extrait de l'offre d'emploi
           endwhile;
       else :
           echo '<p>Aucune offre d\'emploi trouvée.</p>';
       endif;
   
       // Réinitialiser les données de la requête
       wp_reset_postdata();
   
       get_footer();
       ?>
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Peter Kiss (a11n)](https://wordpress.org/support/users/yscik8/)
 * (@yscik8)
 * [2 years ago](https://wordpress.org/support/topic/problem-to-filter-articles/#post-17545207)
 * Hi there!
 * Jobs have the `job_listing` post type, and yes, they are stored as posts and 
   can be queried with `WP_Query` or `get_posts`. [Here is the source](https://github.com/Automattic/WP-Job-Manager/blob/trunk/includes/class-wp-job-manager-post-types.php)
   for the class setting up the post type.
    -  This reply was modified 2 years ago by [Peter Kiss (a11n)](https://wordpress.org/support/users/yscik8/).
 *  Thread Starter [sbrakni](https://wordpress.org/support/users/sbrakni/)
 * (@sbrakni)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/problem-to-filter-articles/#post-17692979)
 * Hello Peter,
 * Thank you for your response, in fact my problem is that the Jobaffinity posts(
   the multi-publication platform for job offers) go to the articles of my WordPress,
   I do not know how to make WP Job Manager read the articles or import these articles
   on the plugin, as it seems like Articles are separate from what WP job manager
   can display.
 * I would be very grateful if you can help me on this one, best regards.
 *  Plugin Support [Joash (a11n)](https://wordpress.org/support/users/joashrajin/)
 * (@joashrajin)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/problem-to-filter-articles/#post-17698823)
 * Hi there!
 * As per our [Support Policy](https://wpjobmanager.com/support-policy/), I am afraid
   that assistance with this kind of issue falls outside our support’s scope. We
   won’t be in a position to provide further help with any modifications or guidance
   on this, but you can consider hiring a developer to assist you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Problem to filter articles’ is closed to new replies.

 * ![](https://ps.w.org/wp-job-manager/assets/icon-256x256.gif?rev=2975257)
 * [WP Job Manager](https://wordpress.org/plugins/wp-job-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-job-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-job-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-job-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-job-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-job-manager/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Joash (a11n)](https://wordpress.org/support/users/joashrajin/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/problem-to-filter-articles/#post-17698823)
 * Status: resolved