Home>

I tried to display the eye-catching image of the specified post page by writing the following in the template.
Didn't work.

echo get_the_post_thumbnail (00000);

I entered the post page ID as a numeric value in the 00000 part above.

How do I specify the post page ID correctly?

By the way,
<? php add_theme_support ('post-thumbnails');?>is added to functions.php.

  • Answer # 1

    <? php

    $post_id = integer value

    ?>

    <? php echo get_the_post_thumbnail ($post_id);?>

    I solved it when I wrote it as above.

Related articles