Forums

WordPress 2.7: Problem with add_meta_box function (6 posts)

  1. GDragoN
    Member
    Posted 11 months ago #

    In WP 2.7, function add_meta_box adds custom box on post edit page. But box is added bellow text editor area. Is there a way to add this box in the sidebar area on the right by default?

  2. GamerZ
    Member
    Posted 11 months ago #

    I am using this code to add the meta box to the right for my WP-Sticky

    add_meta_box('poststickystatusdiv', __('Post Sticky Status', 'wp-sticky'), 'sticky_metabox_admin', 'post', 'side');

  3. GDragoN
    Member
    Posted 11 months ago #

    Thanx Lester. I had to debug admin template.php file to find out about 'side' value.

    But also, in template.php I have found that they have removed another call I used (was working with early WP 2.7) to add meta box on comment edit page. From 'do_meta_boxes' method a do_action call has been commented out. Did you find some other way to add meta box to the edit comments page?

    I tried add_meta_box, but it doesn't work with edit comments page.

    Regards,
    Milan

  4. GamerZ
    Member
    Posted 11 months ago #

    Hmm, I have no idea on that, apparently the accepted values for $page argument is only post, page and link.

    Apparently, they have not yet "meta boxes" the comments part yet as in edit-form-comment.php line 31, they commented out

    // add_meta_box('submitdiv', __('Save'), 'comment_submit_meta_box', 'comment', 'side', 'core');

    Perhaps in WP 2.8 we will see that.

  5. GDragoN
    Member
    Posted 11 months ago #

    When I set $page argument to 'comments', global dashboard object is expanded with comments but obviously nothing is using it at the momemet. Hopefully we don't need to wait until 2.8 for the change in the meta box functions.

  6. GamerZ
    Member
    Posted 11 months ago #

    WP has a history of x.x.1 being bug fixes and it looks like the edit-form-comment.php needs rework in order to support the add_meta_box(). My guess would be 2.8.

Reply

You must log in to post.

About this Topic