Tag Info

Hot answers tagged


I believe that you can achieve this effect by grouping the query by author ID, which will require a filter(mostly cribbed from the Codex): function my_posts_groupby($groupby) { global $wpdb; $groupby = "{$wpdb->posts}.post_author"; return $groupby; } add_filter( 'posts_groupby', 'my_posts_groupby' ); If you have less than 8 authors, ...


You're close - let's take a look at this line: if( 'post' == $post->post_type && count_user_posts(the_author_meta('ID') == 1); ) That semicolon is a syntax error, PHP will barf - let it go the_author_meta() prints data, it does not return anything - use get_the_author_meta() for comparisons and passing things around The post count comparison ...


I never saw a plugin that does that, but it's interesting. You can create a custom meta field for users, and re-create the function wp_notify_postauthor(); which is the responsible for sending messages to author. https://codex.wordpress.org/Function_Reference/wp_notify_postauthor

Only top voted, non community-wiki answers of a minimum length are eligible