0

This is my first attempt to customize WordPress.

I added a meta box like this

function settings_metabox() {
    //register custom meta box
    add_meta_box("mybox-id", "Settings", "settings_callback_function", "blog", "side", "high");
}
add_action("add_meta_boxes", "settings_metabox");

but somehow the meta box div gets injected with style="position: fixed; top: 56px;" when I start to scroll down; and the meta box jumps to the back of the other meta boxes.

This is what it looks like:

new meta box


And when scrolling down it turns to this:

meta box after scrolling down on page

How can I prevent this.

1 Answer 1

0

I found a temporary workaround by doing this

<style>
div #my_meta_box {
    background: #c0cdd7;
    position: relative !important;
    z-index: initial;
}
div #submitdiv {
    z-index: initial;
}
#postbox-container-2 {
    width: calc(100% - 300px)  !important;;
}
#wpfooter {
    display: none;
}
</style>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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