Custom Fields
Re-Envisioned
Support MB Admin Columns Admin search meta key

This topic contains 4 replies, has 2 voices, and was last updated by  Anh Tran 2 years, 2 months ago.

  • Creator
    Topic
  • #5044

    eboss99s
    Participant
    add_filter( 'rwmb_meta_boxes', 'your_prefix_meta_boxes' );
    
    function your_prefix_meta_boxes( $meta_boxes ) {
    	$meta_boxes[] = array(
    		'title'  => __( '商品資訊', 'your-prefix' ),
    		'post_types' => array( 'catalog'),		
    		'fields' => array(
    			array(
    				'name'        => __( '產品編號', 'your-prefix' ),
    				'id'          => 'product_code',
    				'type'        => 'text',
    				 'admin_columns' => true,
    			),
    			array(
    				'name'        => __( '選擇商品第一張圖', 'your-prefix' ),
    				'id'          => 'product_one_pic',
    				'type'        => 'file_input',
    				'admin_columns' => true,
    			),
    			array(
    			    'name'        => __( '選擇商品其他圖片', 'your-prefix' ),
    				'id'          => 'product_two_pic',
    				'type'        => 'image_advanced',
    				'admin_columns' => true,
    			),
    			array(
    				'name'        => __( '摘要', 'your-prefix' ),
    				'id'          => 'product_show_desc',
    				'type'        => 'textarea',
    			),
    			array(
    				'name'        => __( '內頁描述', 'your-prefix' ),
    				'id'          => 'product_show_content',
    				'type'        => 'wysiwyg',
    			),
    		),
    	);

    I need wp-admin search the meta-key about “product_code” ,how to do?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #5052

    Anh Tran
    Keymaster

    That’s a good idea. The Admin Columns extension is displaying the content in the column only. It hasn’t the search feature yet.

    #5061

    eboss99s
    Participant

    What is the original wordpress code can be done?
    Or, in the future you can add this search function in MB Admin Columns.

    #5064

    Anh Tran
    Keymaster

    The WordPress core doesn’t support that. We need to create a custom code for that. I will update the plugin to support that soon.

    #6369

    Anh Tran
    Keymaster

    It’s been a long time, but just want to let you know that the search functionality is done. Please just update the plugin.

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

The topic ‘Admin search meta key’ is closed to new replies.