object tag based placeholder images not working in ie
-
I was trying to make a placeholder image for an image called using the tag slug like so:
<?php if ( is_tag() ) { $term_id = get_query_var('tag_id'); $taxonomy = 'post_tag'; $args ='include=' . $term_id; $terms = get_terms( $taxonomy, $args ); echo ' <OBJECT data="http://www.tradereadingorder.com/character-image/' . $terms[0]->slug . '.jpg" type="image/jpg"><!-- Else, try the 404 image --> <OBJECT data="http://www.tradereadingorder.com/404.jpg" type="image/jpg"> </OBJECT> </OBJECT>'; } ?>
however this method doesn’t work in IE. It just shows a blank tiny image box.
Here’s a link where it’s actually showing the correct image (the only one that works so far)
http://www.tradereadingorder.com/character/alfred-pennyworth/
and here’s one where it’s supposed to show a placeholder:
http://www.tradereadingorder.com/character/elongated-man/
Any advice for how to get this method to work, or an alternative for calling the 404 image? Or any other placeholder type image?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘object tag based placeholder images not working in ie’ is closed to new replies.