0
カテゴリ画像のサムネイルを作成します。 。ここに私のコードが見つかりましたポストイメージが、どのようにイメージを持っていない特定の投稿を終了することができます。 plzは私を指定します。Wordpressを終了して投稿を定義しますか?
<?php //found the images from the post content
global $post, $posts;
$postContent = $post->post_content;
$searchimages = '~<img [^>]* />~';
preg_match_all($searchimages, $postContent, $post_imgs);
// Check to see if we have at least 1 image
$findImages = count($post_imgs[0]);
if ($findImages > 0) {
echo "found"."<br />";
} else {
echo "not found"."<br />";
}
?>
ここで私は定義されていませんが、私はこのポストが見つからないことを望みます。