• Resolved srinivas08

    (@srinivas08)


    Hi, I am using a theme, which uses cmb2 and WPJobBoard Plugin, There are some default fields under custom post type job listing

    https://i.ibb.co/vP605Gn/sah.jpg

    I found the code for these input fields here [/wp-content/plugins/wp-job-board/includes/class-job_listing.php] :

    $metaboxes[ self::$prefix . 'general' ] = array(
    			'id'                        => self::$prefix . 'general',
    			'title'                     => __( 'General Options', 'wp-job-board' ),
    			'object_types'              => array( 'job_listing' ),
    			'context'                   => 'normal',
    			'priority'                  => 'high',
    			'show_names'                => true,
    			'show_in_rest'				=> true,
    			'fields'                    => array(
    
    				array(
    					'name'              => __( 'Expiry Date', 'wp-job-board' ),
    					'id'                => self::$prefix . 'expiry_date',
    					'type'              => 'text_date',
    					'date_format' 		=> 'Y-m-d',
    				),

    Removing this code is disabling the custom meta boxes, but as this is core plugin file, I dont what to modify them…

    How can I disable these fields using functions.php , and also add new fields … I couldnt find any online resources on this..

Viewing 1 replies (of 1 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I assume they have some code regarding add_action/add_filter and whatnot that’s being used to register this.

    That said, it looks like a really old version of CMB2 that isn’t being used in the current latest version. May be best to contact the theme developer about your requests and also to maybe encourage them updating to the latest CMB2.

Viewing 1 replies (of 1 total)

The topic ‘Remove default fields and add New’ is closed to new replies.