Tag Info

New answers tagged

0

As pointed out, you can only change the default ordering, if a user has modified it there's not a huge amount you can do without writing a reset script. Either way, here's how you change the default order properly, (disclaimer, I wrote the article) https://ozthegreat.io/wordpress/wordpress-how-to-move-the-excerpt-meta-box-above-the-editor/ /** * Removes ...


1

You get that error, because the $_GET and $_POST are not filled on every admin page with that data. Also, your code should never rely on globals, they can be changed by any other code, so they are not reliable. So don't use global $post;, $_POST or $_GET when you can get the information from better sources like here. Use the action add_meta_boxes to … well ...


1

Actually your question is off-topic here, because it's javascripts specific and not specific to WordPress. But I'm answering it and making it more WordPress-centric so that others get help too. The following function will enqueue a custom.js file from your theme folder's /js subfolder to only admin panel (put it in functions.php of your theme): function ...


0

Try this: <div class="my-metabox"> <!-- This is your metabox HTML --> <-- Add this button somewhere: --> <button id="my-submit" class="button button-primary button-large">Submit</button> </div> Add this JavaScript snippet however you want only to this screen (either by checking the post type and enqueue ...


0

The key function and search key word is add_meta_box(). This function add additional meta boxes to a post type, also custom post type. See the codex for more about the parameters and also examples. You find also a lot of examples, how tos in the WWW and here on WPSE. A simple example to understand it better, but without callback function ...


0

This depends on how your parent theme hooks in the meta_boxes. If the callbacks are hooked to add_meta_boxes and written similar to the following from the Codex: function myplugin_add_meta_box() { $screens = array( 'post', 'page' ); foreach ( $screens as $screen ) { add_meta_box( 'myplugin_sectionid', __( 'My Post ...



Top 50 recent answers are included