返信先: テンプレートタグ「usces_the_itemImageURL()」について

フォーラム 使い方全般 テンプレートタグ「usces_the_itemImageURL()」について 返信先: テンプレートタグ「usces_the_itemImageURL()」について

#82048
yasumax
キーマスター

こんにちは。

そういうことなのですね。
アイキャッチ画像で要件を満たせたのでしたら良かったですが、少々強引な方法ですがフィルターを利用して商品画像のimgタグに属性を追加することができます。

usces_the_itemImageタグには以下のフィルターが存在します。

  1. apply_filters('usces_filter_img_alt', $alt, $post_id, $pictid, $width, $height)
    alt属性を変更
  2. apply_filters('usces_filter_img_title', $title, $post_id, $pictid, $width, $height)
    title属性を変更
  3. apply_filters( 'usces_filter_main_img', $html, $post_id, $pictid, $width, $height)
    apply_filters( 'usces_filter_sub_img', $html, $post_id, $pictid, $width, $height)
    imgタグ自体を変更

いずれかのフィルターを利用して、任意のimgタグに変更することが可能です。

今後サムネイルのテンプレートタグのご検討をいただけましたら嬉しいです。

ご提案ありがとうございます。
前向きに検討したいと思います。