Display Post Author Link above the loop

It make use of global variable $post to get author id of current post. Using that this function returns the author url. Note – Make sure you put this in condition ( is_single() ) so it only print author url on single.php. <?php echo get_author_posts_url( $post->post_author ); ?> Update – <?php $username = get_userdata( $post->post_author … Read more

List author’s posts with SQL

Your table names are wrong. note in your first query the use of $wpdb->posts to reference the posts table. however– this is a very simple query that can be done via the API rather than writing SQL queries from scratch. Use a new WP_Query instance instead.

How can I manage and limit disk usage for each author?

Okey so this is just an example how you can archive this.. First change the upload directory to the current users username. eg uploads/admin function wpse_16722_type_upload_dir( $args ) { // Get current user data $current_user = wp_get_current_user(); // Make upload dir to current username $newdir=”https://wordpress.stackexchange.com/” . $current_user->user_login; $args[‘path’] = str_replace( $args[‘subdir’], ”, $args[‘path’] ); //remove … Read more

Show comment number per author per day

You can try this query that counts user comments by using the user_id field in the comments table as a filter: function count_user_comments_today( $uid ){ global $wpdb; $today = date(‘Y-m-d’); $tomorrow = date(‘Y-m-d’, time() + 86400); $count = $wpdb->get_var( $wpdb->prepare(“SELECT COUNT(*) FROM {$wpdb->comments} WHERE user_id = %d AND comment_date >= %s AND comment_date < %s … Read more

Allow Google crawler to crawl specific Author pages

I would normally ask a couple clarifying questions but I don’t have the reputation to do it so let’s see if I can give you a workable solution. I don’t know what you consider to be high quality but if it is certain fields being complete, you could do an if/else statement around those fields … Read more

Get author_id in wordpress

Check the value in the get_query_var() function. An example, that works:– $author = get_user_by( ‘slug’, get_query_var( ‘author_name’ ) ); echo $author->ID; If you like only the author of post, inside the loop, then use the template tag get_the_author().

Is author.php a core file?

If you are talking about author.php in your theme directory, usually at wp-content/themes/<YOURTHEMENAME> this isn’t a core file but part of your theme. Themes don’t get changed when WordPress is updated, so concerning WordPress updates themes are safe. But if your theme isn’t custom made by you (which I assume here) this file would be … Read more

Authors & profiles (and exclude ID’s)

First, let me say that it is not “Strangely” working using ‘subscribers’ role. Note that you are taking out the ‘subscriber’ role from the results. The correct way to get only authors and exclude some IDs is using the role and exclude arguments of get_users() function: <?php $args = array( ‘role’ => ‘author’, //authors with … Read more

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