Support » Plugin: Meta Box - WordPress Custom Fields Framework » ‘Add More’ buttons etc. not working

  • I’m trying to use MetaBox inside my plugin, generating a metabox via the online generator works fine and the metabox shows the right contents. However the buttons are not working, when I click one it simply scrolls me back to the top of the page.

    I’ve added the generated metabox code to my theme’s functions.php file and the metabox code looks like this:

    function your_prefix_get_meta_box( $meta_boxes ) {
    	$prefix = '';
    
    	$meta_boxes[] = array(
    		'id' => 'untitledmetabox',
    		'title' => esc_html__( 'Untitled Metabox', 'metabox-online-generator' ),
    		'post_types' => array( 'page' ),
    		'context' => 'advanced',
    		'priority' => 'default',
    		'autosave' => true,
    		'fields' => array(
    			array(
    				'id' => $prefix . 'test',
    				'type' => 'text',
    				'name' => esc_html__( 'test', 'metabox-online-generator' ),
    				'desc' => esc_html__( 'test', 'metabox-online-generator' ),
    				'std' => 'test',
    				'clone' => true,
    				'class' => 'continued_page',
    			),
    		),
    	);
    
    	return $meta_boxes;
    }
    add_filter( 'rwmb_meta_boxes', 'your_prefix_get_meta_box' );
    • This topic was modified 1 year, 10 months ago by sneakyvince.
  • The topic ‘‘Add More’ buttons etc. not working’ is closed to new replies.