Wordpress Featured Image Custom Shortcode
问题 I've ran into an issue that's doing my head in. I'm trying to create custom shortcodes within my themes functions.php file that will allow me to insert and place a posts featured image into a post and align it either left of right. Below is the code I tried last, I've been looking at different sources and trying different things to no avail. function featured_img_left() { if (has_post_thumbnail() ) { $image_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src($image_id,