0

I have follow code from this link, https://gist.github.com/757903 and I have manage to create several metaboxes on my custom options page under Settings section. Stuff that doesn't work for me are :

  1. I can't make it work, so save form work, I think that this hook doesn't exists "add_action('admin_post_save_howto_metaboxes_general', array(&$this, 'on_save_changes'));"
  2. When I move boxes around, next time when I come back to that page, order of meta boxes is not saved, same thing for columns layout.

Can someone help me with this please. Thank you in advance.

2

It's not enough to define areas and put metaboxes in them, you must define the layout via the current screen.

For example, when displaying a dashboard esque widget area on my custom option page, the first things I have are:

global $screen_layout_columns;
add_screen_option('layout_columns', array('max' => 3, 'default' => 3) );
$screen = get_current_screen();
wp_enqueue_script( 'dashboard' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.