On WordPress Search, how to search post from Author meta also

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

Comments counter only for Authors Posts

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

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(); ?>

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