I'm using wti_like plugin and this is how i get the number(count) of post liked by the author
// Get the author object
$author = get_user_by( 'slug', get_query_var( 'author_name' ) );
// Get the post ids liked by the author
$like_ids = $wpdb->get_var("SELECT SUM(value) FROM {$wpdb->prefix}wti_like_post
WHERE user_id = {$author->ID} AND value > 0
GROUP BY post_id ORDER BY SUM(value) DESC");
?>
echo (int)$like_count;
How can i query the posts liked by the author and use my post format to display them in my author.php template?
ie:
get_header(); ?>
<section id="primary" class="site-content">
<div id="content" role="main"
< ?
$args = array(
//QUERY OPTIONS GOES HERE//
);
$wp_query->query( $args ); ?>
<?php if ( have_posts() ) : ? >