Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi all!

    First of all, nice plugin!

    I suggest to change the system of linking the post thumbnail in the og:image meta-tag. You can add a condition that if there is no post-thumbnail grab the first image of the post. Like:

    $first_img = '';
    		$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
    		$first_img = $matches[1][0];
    		if(trim($first_img)) {
    			echo '<meta property="og:image" content="'.trim($first_img).'">';
    		}
Viewing 1 replies (of 1 total)