Title: ossedk's Replies | WordPress.org

---

# ossedk

  [  ](https://wordpress.org/support/users/ossedk/)

 *   [Profile](https://wordpress.org/support/users/ossedk/)
 *   [Topics Started](https://wordpress.org/support/users/ossedk/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ossedk/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ossedk/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ossedk/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ossedk/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ossedk/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/ossedk/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/ossedk/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Job tags attached to certain categories](https://wordpress.org/support/topic/job-tags-attached-to-certain-categories/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years ago](https://wordpress.org/support/topic/job-tags-attached-to-certain-categories/#post-6304194)
 * Tags are predefined , so If I can just receive them via php then it’s fine as
   well, can I call an array with the job tags that is predefined from backend ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Job tags attached to certain categories](https://wordpress.org/support/topic/job-tags-attached-to-certain-categories/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years ago](https://wordpress.org/support/topic/job-tags-attached-to-certain-categories/#post-6304191)
 * I can with ease track a change on the category….
 * But we are talking about the job tags.
 * How do I receive a list of the current job tags ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Disable Expired Listings from showing in Dashboard](https://wordpress.org/support/topic/display-expired-listings-from-showing-in-dashboard/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/display-expired-listings-from-showing-in-dashboard/#post-6190570)
 * Many many thanks Mike!
 * Works like a charm!
 * Again thank you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Disable Expired Listings from showing in Dashboard](https://wordpress.org/support/topic/display-expired-listings-from-showing-in-dashboard/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/display-expired-listings-from-showing-in-dashboard/#post-6190564)
 * I mean the dashboard on the frontend – so the person makeing the job listing.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Subscribe2 - Form, Email Subscribers & Newsletters] Multi store](https://wordpress.org/support/topic/multi-store/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/multi-store/#post-6173239)
 * Dosen’t matter, build work-around for it – so it works fine now – thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Subscribe2 - Form, Email Subscribers & Newsletters] Multi store](https://wordpress.org/support/topic/multi-store/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/multi-store/#post-6173118)
 * Basicaly the optional solution would just be to only show the ajax pop up box
   and then it stays on the same page.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Getting Category name from $_POST search_categoreis value](https://wordpress.org/support/topic/getting-category-name-from-_post-search_categoreis-value/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/getting-category-name-from-_post-search_categoreis-value/#post-6062253)
 * Nevermind found it 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Getting Category name from $_POST search_categoreis value](https://wordpress.org/support/topic/getting-category-name-from-_post-search_categoreis-value/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/getting-category-name-from-_post-search_categoreis-value/#post-6062251)
 * cool, only question is what is the listing category called ?
 * get_term_by(‘id’, $categoryId, ‘search_categories’)
 * it’s not search_categories and where do I find these next time?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Adding another ORDERBY for the shortcode](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/#post-6044925)
 * Yes of course 🙂
 * But the new function was inside the function get_job_listings_query_args
 * Which made the error of already declared so each time get_job_listings_query_args
   was run it was redeclaring the new function args_function_rating_dsaw – so I 
   moved it outside of get_job_listings_query_args but still in functions.php of
   course:)
 * Works perfectly
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Adding another ORDERBY for the shortcode](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/#post-6044881)
 * Got it solved by moving the function outside and declaring it to:
 *     ```
       function args_function_rating_dsaw($args) {
           $args['orderby'] = 'meta_value_num';
           $args['order'] = 'DESC';
           $args['meta_key'] = 'rating';
           return $args;
           }
       ```
   
 * Many thanks for the help!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Adding another ORDERBY for the shortcode](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/#post-6044879)
 * it’s somehow because it’s implemented within function get_job_listings( and each
   time this function is called it gets redeclared or that’s at least my assumption.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Adding another ORDERBY for the shortcode](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/#post-6044878)
 * So to be clear it states it’s alerady declared in the line right under add_filter
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Adding another ORDERBY for the shortcode](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/#post-6044877)
 * I still get the same error after edit the function name
 *     ```
       add_filter('get_job_listings_query_args', 'args_function_rating_dsaw');
   
       function args_function_rating_dsaw( $args ) {
       $args['orderby'] = 'rating';
       return $args;
       }
       ```
   
 * The issue is that the error is stated for the line of the function name.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Adding another ORDERBY for the shortcode](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/#post-6044873)
 * Really appreciate your help,
 * Made as simple as possible
 *     ```
       $query_args = apply_filters( 'get_job_listings_query_args', $query_args, $args );
   
           add_filter( 'get_job_listings_query_args', 'custom_get_job_listings_query_args' );
   
       function custom_get_job_listings_query_args( $args ) {
       $args['orderby'] = 'rating';
       return $args;
       }
       ```
   
 * But here I get “Cannot redeclare custom_get_job_listings_query_args() (previously
   declared”
 * What is the mistake on this?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Job Manager] Adding another ORDERBY for the shortcode](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/)
 *  Thread Starter [ossedk](https://wordpress.org/support/users/ossedk/)
 * (@ossedk)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/adding-another-orderby-for-the-shortcode/#post-6044871)
 * Thanks for the info.
 * I have tried to follow it, can you let me know if I’m getting closer :
 *     ```
       $query_args = apply_filters( 'get_job_listings_query_args', $query_args, $args );
   
           function addRating($query_args){
               $args2 = array(
               'orderby'  => 'meta_value_num',
               'order' => 'DESC',
               'meta_key' => 'rating',
               'meta_query' => array(
                   array(
                       'key'     => 'rating',
                       'value'   => null,
                       'compare' => '!='
                   )
   
               ), // End of meta_query
               'fields'  => 'ID',
               'exclude' => array(
                   1
               ),
   
           );
               	$query_args = array_merge('get_job_listings_query_args', 'addRating');
   
                   return $query_args;
           }
           add_filter( $query_args,'addRating');
       ```
   

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/ossedk/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/ossedk/replies/page/2/?output_format=md)