• Hi, I use the I like this plugin to show vote on my site, and I want for most liked post to show the content also not just the tilte.. I find this part of code, and I think this is what I need to change, can you please help me I try something by my self but I am not so good…

    function most_liked_posts($numberOf, $before, $after, $show_count) {
    	global $wpdb;
    
        $request = "SELECT ID, post_title, meta_value FROM $wpdb->posts, $wpdb->postmeta";
        $request .= " WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id";
        $request .= " AND post_status='publish' AND post_type='post' AND meta_key='_liked'";
        $request .= " ORDER BY $wpdb->postmeta.meta_value+0 DESC LIMIT $numberOf";
        $posts = $wpdb->get_results($request);
    
        foreach ($posts as $post) {
        	$post_title = stripslashes($post->post_title);
        	$permalink = get_permalink($post->ID);
        	$post_count = $post->meta_value;
    
        	echo $before.'<a href="' . $permalink . '" title="' . $post_title.'" rel="nofollow">' . $post_title . '</a>';
    		echo $show_count == '1' ? ' ('.$post_count.')' : '';
    		echo $after;
        }
    }

The topic ‘I like This plugin and content to show’ is closed to new replies.