I have a block template for a custom post type. It has an audio player followed by a link to a YouTube video, and I’d like to have a YouTube logo to the left of the video link. But what I can’t figure out is how to specify the logo media, instead of just having an empty image block that has to have the same media selected from the Media Library every time. At first I thought this would be a good use for a reusable block, but it appears that reusable blocks don’t have alignment capability so that WP will float them. This is my code so far:
What array element(s) would I add to the core/image
one to include the src
attribute in the <img>
tag?
I tried console.log(wp.blocks.getBlockTypes());
in my browser console (see this thread), but I couldn’t spot anything that looked like the right attribute under block/image
.
- 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