Author can only see own post comment and can moderate

The default author role does not have the moderate_comments capabilities so you need to add that capability to the author role, so add this to your plugin: function add_theme_caps() { $role = get_role( ‘author’ ); // gets the author role $role->add_cap( ‘moderate_comments’ ); // would allow the author to moderate comments } add_action( ‘admin_init’, ‘add_theme_caps’);

Order query by post meta value

Take a look at the WordPress Codex: http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_orderby function edit_posts_orderby($orderby_statement) { $orderby_statement = “meta_value DESC”; return $orderby_statement; } add_filter(‘posts_orderby’, ‘edit_posts_orderby’); If you’re making the WP_Query yourself you can change the orderby parameter to meta_value Take a look here: http://codex.wordpress.org/Class_Reference/WP_Query

Author bio Social Links

You need to check, if the field is empty or not before printing link using the get_the_author_meta function. <?php if(!empty(get_the_author_meta(‘twitter’))) { ?> <a href=”https://wordpress.stackexchange.com/questions/75981/<?php the_author_meta(“twitter’); ?>” title=”Twitter” target=”_blank” id=”twitter”><img src=”/images/twitter.png” alt=”Twitter” /></a> <?php } ?> or, try <?php if(!empty(get_user_meta(get_the_author_meta(‘ID’),’twitter’))) { ?> <a href=”https://wordpress.stackexchange.com/questions/75981/<?php the_author_meta(“twitter’); ?>” title=”Twitter” target=”_blank” id=”twitter”><img src=”/images/twitter.png” alt=”Twitter” /></a> <?php } ?> but, … Read more

How Can I Call Up The Author’s Name on a Post

Inside The Loop you can use the Template Tag the_author() to display or get_the_author() to return the same. For an introduction to outside the loop usage take a look at the Q&A’s at the thread How to get Author ID outside the loop on here.

Showing author’s page with no posts

You can use the get_queried_object where the CODEX says: if you’re on an author archive, it will return the author object So since you have an object, you can return it values: $author = get_queried_object(); echo $author->first_name . ‘ ‘ . $author->last_name; And you can use the same parameters as get_the_author_meta(): user_login user_pass user_nicename user_email … Read more

Send transactional email: first user’s post

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 needs to … Read more

List user comments in author page

Try with WP_Comment_Query and make sure you have the right Author ID from the Author Template. // WP_Comment_Query arguments $args = array ( ‘user_id’ => $user->ID, ‘post_status’ => ‘approve’, ‘number’ => ’10’, ); // The Comment Query $comments = new WP_Comment_Query; $comments = $comments->query( $args ); // The Comment Loop if ( $comments ) { … Read more

Hide notifications regarding new comments

Based off of the code from another question that you referenced, I’ve added onto it by changing the total number of comment using jQuery: add_filter( ‘the_comments’, ‘wpse_236055_filter_comments’ ); add_action( ‘admin_head’, ‘wpse_236055_comment_notification’ ); function wpse_236055_filter_comments( $comments ){ // Display comments related to the author global $pagenow, $user_ID, $comment_count; wp_get_current_user(); if ( $pagenow == ‘edit-comments.php’ && current_user_can( … Read more

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