WP eCommerce のカスタム メタ フィールドにイメージ タグを追加する必要がありますが、追加するとテキストとして表示されます。したがって、Jquery を使用して < > ブラケットを見つけて置き換え、代わりにタグとしてレンダリングされるようにします。
ここに私のソースコードがあります:
<div class="custom_meta">
<strong>CODE: </strong>JL16<br>
<strong>Colour: </strong><img src="http://localhost:81/live_products/shop/wp-content/uploads/blue.gif" /><br>
<strong>COLOURS: </strong>BLACK, WHITE, GREY, CORAL, BLUE<br>
<strong>FABRIC: </strong>LYCRA<br>
</div>
jQueryで動作するはずだと思う方法は次のとおりです。
jQuery(document).ready(function(){
// Remove "" from meta image
jQuery(".custom_meta").replace(/</g, '<');
jQuery(".custom_meta").replace(/>/g, '>');
});
<
これはto < とto >を置き換える正しい方法>
でしょうか?
ありがとうございました。