post_thumbnail_id WordPress Filter Hook
The post_thumbnail_id hook is a great way to set a custom thumbnail for your posts. This hook allows you to set a custom post thumbnail for your post, which can be useful if you want to use a different image than the one that is set by default.
apply_filters( 'post_thumbnail_id', int|false $thumbnail_id , int|WP_Post|null $post ) #
Filters the post thumbnail ID.
Parameters
Source
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |