How to get the total count of Favorite/Favorited authors

This will help you to show how many author current user favorite others: Add this to your themes functions.php file <?php function get_fav_auth_count(){ if ( is_user_logged_in() ) { global $current_user; wp_get_current_user(); $count = size_of(get_user_option(‘favorite-authors’, $current_user->ID)); echo $count; } } ?> and call it like this <?php get_fav_auth_count(); ?>

How to get User Avatar Image with link to Author and User name in Html Title tag?

My god 😛 It was as simple as html tags, I just didn’t know the correct wordpress functions to use. Here it go, for future reference: <a href=”https://wordpress.stackexchange.com/questions/305561/<?php echo get_author_posts_url( get_the_author_meta(“ID’ ), get_the_author_meta( ‘user_nicename’ ) ); ?>”> <img src=”<?php echo get_avatar_url( get_the_author_meta( ‘ID’ ) ); ?>” title=”<?php echo get_the_author(); ?>”> </img></a>

HELP! Frontend User Profile Edit Won’t Update Email

Your code looks ok. Maybe this line: elseif(email_exists(esc_attr( $_POST[’email’] )) != $current_user->id ) Should be elseif(email_exists(esc_attr( $_POST[’email’] )) != $current_user->ID ) Every developer should start with learning how to debug code. Otherwise you’re just trying stuff like a headless chicken ;-). WP Debugging In your wp-config.php, change: define( “WP_DEBUG”, false ); Into: define( “WP_DEBUG”, true … Read more

Using transients to store form notifications

I would use user ID then user IP if not logged in, you can store the result like the following: /* your form validation/submission logiccode goes here */ $max_execution_tim = @ini_get(‘max_execution_time’); $submission_result = array(‘message’ => ‘Worked!’, ‘status’ => ‘success’); // You can use this function: // https://stackoverflow.com/a/6718472/1321398 $user_ip = GetIP(); $transient_name = is_user_logged_in() ? “form_submission_user-” … Read more