Link to Author archive from Navigation Menus in dashboard?

I don’t really understand why you want to use a menu to control this but it wouldn’t be very hard. First you obviously need a new page template for your grid which you will use get_users to pull your users for display – https://codex.wordpress.org/Function_Reference/get_users Now if you want to control the order and whom is … Read more

Restrict one post per author

Answer from comments: First, create a conditional to check if the user has already ‘published’ a post. If yes, simply redirect them. One can use update_post_meta with the post ID without any problem. Simply use that information to populate the fields.

Change Comment Author Display Name

You are missing a “NOT” logical operator (!) in your if statement. You want to say “if comment author IS NOT empty”. As of now, the function is reading that the author is not empty and defaulting to your else statement that tells it to output the author’s full name. Use the second block of … Read more

Display Random Author with Details in Sidebar

Your best option is to get a random post author which is a user ID so here is a function to do just that: function get_random_author_wpa91320(){ global $wpdb; $id = $wpdb->get_var(” SELECT post_author FROM $wpdb->posts WHERE post_type=”post” AND post_status=”publish” ORDER BY RAND() LIMIT 1 “); return $id; } And once you have that function in … Read more

Publish author posts only with editor approval?

Add the following code to your functions.php: function allow_contributor_uploads() { $contributor = get_role(‘contributor’); $contributor->add_cap(‘upload_files’); } if ( current_user_can(‘contributor’) && !current_user_can(‘upload_files’) ) { add_action(‘admin_init’, ‘allow_contributor_uploads’); } This will add the upload_files capability to the Contributor role. It only needs to run once; just login to admin as a user with the Contributor role. After it successfully … Read more

Prevent Authors from viewing each others Posts

If you want to prevent a user with the “Author” role to view other users’ posts in the overview screen (they won’t be able to view the details anyway), you can add an extra filter on the author: add_action( ‘load-edit.php’, ‘wpse14230_load_edit’ ); function wpse14230_load_edit() { add_action( ‘request’, ‘wpse14230_request’ ); } function wpse14230_request( $query_vars ) { … Read more

Change the author slug from nickname to ID

Surprised to see this unanswered for this long. This is pretty simple to do with a simple block of code: function set_my_nice_name() { global $wpdb; $user_table = $wpdb->prefix . ‘users’; $wpdb->query(“UPDATE $user_table SET `user_nicename`=`ID`”); } add_action(‘init’, ‘set_my_nice_name’); This works because the visible portion of an author slug (or profile slug in BuddyPress) uses the user_nicename … Read more

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