Edit draft from other author

Please review the information here: http://codex.wordpress.org/Roles_and_Capabilities Specifically, the following: Editor – somebody who can publish and manage posts including the posts of other users. An Editor is exactly that – someone who can edit what other people are doing. Ensure that the Users who you want to have Editor rights are assigned as Editors in … Read more

wp_insert_post Only creates draft

The reason why your code created drafts only is status=”pending” make it publish Like // Prepare to save! do_action( ‘wpo_frontend_before_save_order’, $order_details, $user_details ); $post = array( ‘post_title’ => $order_details[‘title’], ‘post_author’ => get_current_user_id(), ‘post_type’ => ‘wp_order’, ‘post_status’ => ‘publish’ ); $postID = wp_insert_post( $post ); if ( is_wp_error( $postID ) ) { set_transient( ‘wpo_new_order_message_’ . get_current_user_id(), … Read more

Making draft page as the main page

Go to the “Settings” menu Then to “Reading” Click the “A static page” radio button next to “Front Page Displays” And select your “page-5” in the dropdown next to “Front Page”. Make sure you have a blog page selected as well. (The image is from the Codex. The correct buttons are not clicked but that … Read more

How do I redirect a permalink for a Draft post to a custom 404 page?

Here is what I came up with. Seems to be working. If anyone has suggestions for improvement, I’m all ears: // Redirect links to future posts to Coming Soon page. add_action(‘wp’,’redirect_coming_soon_posts’, 0); function redirect_coming_soon_posts(){ global $wpdb; if ($wpdb->last_result[0]->post_status == “future” && $wpdb->last_result[0]->post_date_gmt != ‘0000-00-00 00:00:00’ && ! is_admin() ): session_start(); $_SESSION[‘next_post_id’] = $wpdb->last_result[0]->ID; wp_redirect( ‘/coming-soon’, … Read more

Remove Save Draft & Preview Buttions.. and also Statius: Draft & Visibility: Public

You can hide them using CSS. Add this to the theme’s functions.php file, or add a plug-in header to the top of the file and zip it up to use as a plug-in: <?php add_action(‘admin_print_styles’, ‘remove_this_stuff’); function remove_this_stuff() { ?> <style> #misc-publishing-actions, #minor-publishing-actions { display:none; } </style> <?php } ?>

Content Visibility for WordPress is not working (Drafts, public etc.)

To see only the “publish” post, you have to specified the “post_status”. The documentation of the wp_get_recent_posts function said, that if no “post_status” is specified the function used the default values “draft, publish, future, pending, private”. $defaults = array( ‘numberposts’ => 10, ‘offset’ => 0, ‘category’ => 0, ‘orderby’ => ‘post_date’, ‘order’ => ‘DESC’, ‘include’ … Read more

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