Author.php Page views counter
Author.php Page views counter
Author.php Page views counter
You get the author ID of the post ID via get_post_field $post_author_id = get_post_field( ‘post_author’, $post_id ); With this post ID you get all author meta data, also the name like the_author_meta( ‘display_name’, $post_author_id );
You can start with prepare information what you need using MySQL SELECT * FROM `wp_usermeta` WHERE `meta_key` = “description” For example, you can create the file with the prepared output of your custom query and then use jQuery * Ajax for your search box.. I’ve show you sample of json file: <?php require_once(‘../../../wp-load.php’); $gm = … Read more
$the_query = new WP_Query(“post_type=post&paged=”.get_query_var(‘paged’)); while ( $the_query->have_posts() ) : $the_query->the_post(); <?php the_excerpt(); ?> <p><?php the_author_image(); ?></p> <?php endwhile; ?>
Can’t use Persian/Farsi in Author slug (returns 404)
For the moment just for hiding the comments counter from an author role, i made a small code like that /* * Hide Comments Counter for Author Hook */ if ( ! current_user_can( ‘manage_options’ ) ) { add_filter( ‘comment_status_links’, function( $status_links ) { // Override the original links: $status_links[‘trash’] = sprintf( “<a href=%s>%s <span class=”count”></span></a>”, … Read more
This is your problem: $follow_ids = $wpdb->get_results( “SELECT meta_value FROM brilli_usermeta WHERE user_id = “.$user_id ); No meta key is specified, and it’s a raw SQL query, which means all user meta values are returned, even those that aren’t relevant. You need to specify a key But why bother with a direct query, when a … Read more
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(); ?>
Send email to users when they get new followers
did you tried to check if any og:image duplicate in your <head> tag. Or you can try to increase the priority of filter hook. Example below, using the filter with priority = 99 (almost latest). add_filter(‘wpseo_opengraph_image’, ‘custom_author_og_image’, 99);