Publish button inside custom field group

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 this in the admin footer or output it directly along with your metabox … Read more

display wordpress user who published a pending post of another user

get_the_modified_author(); isn’t going to tell you who published the post, just who last edited it. You will need to capture you publisher yourself. function post_published_notification( $ID, $post ) { $publisher = wp_get_current_user(); update_post_meta($ID,’my_publisher’,$publisher); } add_action( ‘publish_post’, ‘post_published_notification’, 10, 2 ); Then use get_post_meta($post_id,’my_publisher’) to retrieve the data. Of course there are a numerous ways to … Read more

Add new post using a page inside the website

You have never read the WP documentation? Create any template and form and when submitting the form it could be Example: $args = array(‘post_type’=>’post’, ‘post_title’=>’your title’, ‘post_status’=>’publish’, ‘post_content’=>’post content’); wp_insert_post ($args); This will allow any post page or custom post type to insert the post

Get content of publish box

add_action( ‘post_submitbox_misc_actions’, ‘show_current_filter’ ); add_action( ‘post_submitbox_start’, ‘show_current_filter’ ); function show_current_filter() { $post = get_post(); print ‘<pre>’ . $post->ID . ‘ : ‘ . current_filter() . ‘</pre>’; } https://codex.wordpress.org/Plugin_API/Action_Reference/post_submitbox_misc_actions https://developer.wordpress.org/reference/hooks/post_submitbox_start/

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)