help with get_post_thumbnail_id instead of get_post_meta? IE incompatible!?
-
Hey guys, I was hoping someone might be able to help with small piece of code.
I have this:
$slider_image_id = get_post_meta($product->ID, 'Slider Image', true); $post_image = wp_get_attachment_url($slider_image_id);
which loads the page’s specified image that is put in a ‘custom field’ box.
I was hoping I could put something like this:
$slider_image_id = get_post_thumbnail_id( $post_id ); $post_image = wp_get_attachment_image_src( $attachment_id );
But of course I’m not an expert… it is more complicated as the images are from ‘child’ pages.
You can see the code working here:
https://www.vendome.com.au/products/faberge-jewellery/
But I am having issues with the images loading in all IE.. sometimes/mostly they do not load.
I am hoping that calling them in cleanly might help, can anyone help?
Chrissy
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘help with get_post_thumbnail_id instead of get_post_meta? IE incompatible!?’ is closed to new replies.