Support » Plugin: BuddyPress Xprofile Custom Field Types » Taxonomy from WP JOB MANAGER

  • Hi

    For my website, I use WP JOB MANAGER.
    Instead of WP JOB MANAGER resume, I use Buddypress.
    I want to have taxonomy from Job to be used also on User profile (Job Category and Region)

    I have created a Xprofile field “Region Available” on user profile with Custom Taxomy Selection, I select job_listing_region from plugin Regions for WP Job Manager
    Screenshot https://prnt.sc/p3lptx

    I wanted to do the same for Job Profile, taking the Job category taxonomy but this taxonomy does not display in the list of taxonomy available
    It does neither display in custom post type
    Screenshot
    Custom Taxonomy Selector https://prnt.sc/p3lqpj
    Custom Post Type Selector https://prnt.sc/p3lqq2

    Region is a separate plugin
    Category is a taxonomy nativ in WP Job Manager, it can be activated or deactivated.
    Here’s URL for Region https://prnt.sc/p3lrd4
    And URL for Job Category https://prnt.sc/p3lrdy
    That’s definetely a taxonomy.

    WP JOB MANAGER has also “Job Type”, an other taxonomy that can be activated or deactivated. Same than Job Category it does not display in the list of taxonomy available.

    Is it an issue you can solve in BuddyPress Xprofile Custom Field Types plugin ?
    Or is it related to WP JOB MANAGER ?

    Thanks

    Regards

    Johan

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Brajesh Singh

    (@sbrajesh)

    Hi Johan,
    Thank you for the question. I am not sure I have the right answer for this.

    At the moment, we only list post types/taxonomies set as public. If a taxonomy or post type is not appearing, they might be set private.

    You may try to change this
    https://github.com/buddydev/bp-xprofile-custom-field-types/blob/master/src/field-types/class-field-type-select-taxonomy.php#L122

    from true to false for the ‘public’ field and see if that works for you. same goes for other field types.

    Regards
    Brajesh

    Hi Brajesh

    After changing “custom taxonomy selector” to false it displays taxonomy from WP JOB MANAGER
    Screenshot https://prnt.sc/p3p5wn
    But it does not display any more job_listing_region
    I have changed job_listing_region to “custom taxonomy multiselector” and it does the trick
    Screenshot https://prnt.sc/p3p5wn
    multiselector does not display wp job manager taxonomy

    Those taxonomies can be hidden (activated) or not ; I activated it them so they should be visible
    Screenshot
    https://prnt.sc/p3p1ri
    https://prnt.sc/p3p216

    Problem might be in WP JOB MANAGER plugin that still does not make taxonomy visible even after activation

    I will contact them

    Regards

    Johan

    Plugin Author Brajesh Singh

    (@sbrajesh)

    Hi Johan,
    Thank you for sharing the details. They might be doing ti differently.

    Please do share their response and let me know if anything needs to be done differently on our end.

    Thank you
    Brajesh

    Hi Brajesh

    I haven’t received an answer from WP Job Manager yet, but I am working on it and will post their answer concerning taxonomy category and type from their plugin.

    I had an other issue with taxonomy.
    Taxonomy are not available as a search field in BP Profile Search that makes my trick using taxonomby from WP Job Manager on Profile useless !

    I found an answer you gave concerning this question on your forum
    https://buddydev.com/support/forums/topic/registering-taxonomies-for-bp-profile-search/
    Is this answer still up to date ?
    No solution to make taxonomy available as search fields ?

    Hi @johan_walter, @sbrajesh,

    As you mentioned ‘BP Profile Search’ I was notified of this thread.

    There is a solution to make Custom Taxonomy Selector and Custom Taxonomy Multiselector types available as BP Profile Search fields, it’s detailed in:

    https://wordpress.org/support/topic/registering-fields-with-bp-profile-search/

    Of course I’m available to answer any further questions you may have.

    @sbrajesh
    Hi Brajesh,

    I have received answer from WP Job Manager and managed to have taxonomy job_listing_category displayed in Custom Taxonomy Selector.

    You were right taxonomy are not set as public but as private even when enabled.
    To have them set as public we need to enable full template support including the following code in theme
    add_theme_support( 'job-manager-templates' )

    https://wpjobmanager.com/document/enabling-full-template-support/
    This documentation does not say where to add the code, I included it in functions.php of my theme.

    @dontdream
    Hi Andrea

    Thanks to take part of this thread.

    I use both Custom Taxonomy Selector and Custom Taxonomy Multiselector

    1 – Does that mean I need to include 2 different add_action ?

    add_action ('bps_custom_field', 'register_my_type');
    function register_my_type ($f)
    {
        if ($f->type != 'select_custom_taxonomy')  return;
    
        // register the format of the field type
        $f->format = 'text';
    
        // register the field options, if they are not stored in
        // the standard (wp_)bp_xprofile_fields table, e.g.
        // $f->options = array (73 => 'News', 1 => 'Uncategorized');
        $f->options = ...
    }
    

    and this one

    add_action ('bps_custom_field', 'register_my_type');
    function register_my_type ($f)
    {
        if ($f->type != 'multiselect_custom_taxonomy')  return;
    
        // register the format of the field type
        $f->format = 'text';
    
        // register the field options, if they are not stored in
        // the standard (wp_)bp_xprofile_fields table, e.g.
        // $f->options = array (73 => 'News', 1 => 'Uncategorized');
        $f->options = ...
    }

    2 – Where should I include this code ? in bp-custom.php ?

    3 – In your conversation with Brajesh you mention it is not suitable for larger installation but might be OK for small sites ? How do you quantify when a site is not small any more ? Number of users ? Number of fields per user ?

    Thanks

    Johan

    Plugin Author Brajesh Singh

    (@sbrajesh)

    Hi Andrea,
    Thank you again. I am definitely going to look at that this week and see if we can get it in. If there is any issue, I will be getting in touch.

    Regards
    Brajesh

    PS: Hi Johan, Please allow me implement it this week and see if I can get that.

    Regards
    Brajesh

    Hi Brajesh,

    Thank you, that’s great!

    Hi Johan,

    When Brajesh updates ‘BuddyPress Xprofile Custom Field Types’ you won’t have to do anything else.

    Re your 3rd question, it depends on many factors, e.g. how powerful your server is, how much traffic it gets, and so on. I’d guess that, on an average installation, a site with ten or twenty thousand members could work without noticeable problems.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.