do_action( ‘post_submitbox_misc_actions’, WP_Post $post )

Fires after the post time/date setting in the Publish meta box.

Parameters

$postWP_Post
WP_Post object for the current post.

Source

do_action( 'post_submitbox_misc_actions', $post );

Changelog

VersionDescription
4.4.0Added the $post parameter.
2.9.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    Below is a basic example that will add a select box right before the submit button.

    add_action( 'post_submitbox_misc_actions', 'wpdocs_post_submitbox_misc_actions' );
    
    function wpdocs_post_submitbox_misc_actions( $post ) {
    ?>
    
    <div class="misc-pub-section my-options">
    	<label for="my_custom_post_action">My Option</label><br/>
    	<select id="my_custom_post_action" name="my_custom_post_action">
    		<option value="1">First Option goes here</option>
    		<option value="2">Second Option goes here</option>
    	</select>
    </div>
    
    <?php
    }

You must log in before being able to contribute a note or feedback.