Allow an editor to change the author
Did you use ‘register_post_type’ ? If yes, you can add on supports parameters => ‘author’ ?
Did you use ‘register_post_type’ ? If yes, you can add on supports parameters => ‘author’ ?
Relevanssi can be configured to search in author names. It doesn’t search in author descriptions.
I believe your best bet is to create a custom post type for the certain posts you want editable by multiple authors. When you register your post assign a capability type (#WIKI# in this example) and then add the ‘edit_others_#WIKI#s’ to the author role.
You could register a user_meta field (probably a dropdown) and use that to select templates. You will still need to use if statements to differentiate the templates, but you’re going to need that regardless of the route you take. If you use get_template_part() you can split out the actual html and such of it and … Read more
Just change to to address for these emails. Sample code, not tested: // hook in late, to avoid side effects. add_filter( ‘comment_notification_headers’, ‘wpse_73855__change_comment_notify_to’ ); function wpse_73855__change_comment_notify_to( $input ) { if ( ‘comment_notification_headers’ === current_filter() ) { add_filter( ‘wp_mail’, __FUNCTION__ ); return $input; } $input[‘to’] = get_option( ‘admin_email’ ); remove_filter( current_filter(), __FUNCTION__ ); return $input; }
It sounds like you want to change the Author for existing posts. If this is the case, in your Admin screen, go to Posts | All Posts and place a checkmark next to whichever posts you want to reassign the Author. Then, near the top, in the Bulk Actions dropdown, select Edit and click Apply. … Read more
I think that the best approach is to add the edit_other_posts capability to “author” role in plugin/theme activation and remove that capability on plugin/theme deactivation. With this method you only run the task once and you don’t need further coding. Using plugin activation/deactivation: register_activation_hook( __FILE__, ‘cyb_activation_function’ ); function cyb_activation_function() { $author = get_role( ‘author’ ); … Read more
Post authors are stored in the wp_posts table under the post_author column. Check the database description. The author in that table is stored as an ID number which references the ID in the wp_users table. Additional user information is kept in the wp_usermeta table. I have no idea what you may have to do to … Read more
Have a look on the date_query parameter that has been added to WP 3.7 WP_Query#Date_Parameters and the author parameter. Combine the two parameters as you need them to query all posts an author created in a given time: <?php $args = array( ‘posts_per_page’ = -1, // get all posts ‘author’ => get_the_author_meta( ‘ID’ ), // … Read more
I don’t know what are you trying to do with if-else statement, but to display author name with their published post link use this code: <span>Article posted by <?php the_author_posts_link(); ?></span> Tweak it according to your need. One more thing: You need to call the_author_posts_link() function within the while loop (Yes, the same while loop, … Read more