Cannot save CPT meta box

It’s your nonce generation and checking… You also weren’t saving your audio link and I cleaned the setting of the meta up (sanitize the URL and fix the conditionals) This works locally for me <?php add_action( ‘init’, ‘create_post_type’ ); function create_post_type() { register_post_type( ‘Sermon’, array( ‘labels’ => array( ‘name’ => __( ‘Sermons’ ), ‘slug’ => … Read more

How to make a stand-alone button to the post edit view

First of all you need prevent whole post form sending. Try: function rt_custom_button(){ $html=”<div id=”major-publishing-actions” style=”overflow:hidden”>”; $html .= ‘<div id=”publishing-action”>’; $html .= ‘<button onclick=”send_note(event);” accesskey=”p” tabindex=”5″ class=”button-primary” id=”custom” name=””>send media note</button>’; $html .= ‘</div>’; $html .= ‘</div>’; echo $html; } add_action( ‘post_submitbox_misc_actions’, ‘rt_custom_button’ ); Then you need to add JS function somewhere: function send_note(event){ event.preventDefault(); … Read more