New post status for custom post type

There is a great Step by Step description on how to do that here https://www.jclabs.co.uk/create-custom-post-status-in-wordpress-using-register_post_status/ To add your custom post status to the drop-down menue, just add the following to your themes function script: add_action(‘admin_footer-post.php’, ‘jc_append_post_status_list’); function jc_append_post_status_list(){ global $post; $complete=””; $label=””; if($post->post_type == ‘recipes’){ if($post->post_status == ‘aggregated’){ $complete=” selected=\”selected\””; $label=”<span id=\”post-status-display\”> Aggregated</span>”; } echo … Read more

How to check if a user (not current user) is logged in?

I would use transients to do this: create a user-online-update function that you hook on init; it would look something like this: // get the user activity the list $logged_in_users = get_transient(‘online_status’); // get current user ID $user = wp_get_current_user(); // check if the current user needs to update his online status; // he does … Read more

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