I have a meta box on each post where a user is able to select another image from the media library.
I want this image to override the output whenever get_the_post_thumbnail
is used across the whole theme.
I’ve looked through the wp-includes/post-thumbnail-template.php
file and found the get_the_post_thumbnail
function, and it looks like this might be what I want to hook into but I’m not exactly sure how to use it:
I want to do something like this:
I have a feeling it might not be possible with an action, so I noticed there is also the post_thumbnail_html
filter, but I was hoping to avoid having to modify this if all I want to change is the attachment ID and otherwise keep the HTML exactly the same.
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com