onair-k

4.09.2012

ギャラリー画像にクラス名追加

functions.phpに追加

add_filter( 'wp_get_attachment_link', 'my_get_attachment_link', 10, 6 );
function my_get_attachment_link( $link, $id, $size, $permalink, $icon, $text ) {
return str_replace( '<img ', '<img class="hover" ', $link);
}
投稿者 onair-k 時刻: 18:18
ラベル: wordpress ギャラリー
次の投稿 前の投稿 ホーム

ブログ アーカイブ

  • ►  2018 (3)
    • ►  3月 (3)
  • ►  2017 (1)
    • ►  12月 (1)
  • ►  2016 (1)
    • ►  6月 (1)
  • ►  2015 (2)
    • ►  9月 (1)
    • ►  7月 (1)
  • ►  2014 (13)
    • ►  9月 (1)
    • ►  7月 (1)
    • ►  6月 (2)
    • ►  5月 (5)
    • ►  1月 (4)
  • ►  2013 (9)
    • ►  12月 (1)
    • ►  10月 (1)
    • ►  9月 (2)
    • ►  7月 (3)
    • ►  6月 (1)
    • ►  3月 (1)
  • ▼  2012 (63)
    • ►  10月 (3)
    • ►  9月 (4)
    • ►  8月 (1)
    • ►  7月 (2)
    • ►  6月 (5)
    • ►  5月 (1)
    • ▼  4月 (3)
      • wordpress サイトURLを正規に
      • wordpress テンプレートタグ
      • ギャラリー画像にクラス名追加
    • ►  3月 (10)
    • ►  2月 (22)
    • ►  1月 (12)

自己紹介

onair-k
詳細プロフィールを表示
「シンプル」テーマ. Powered by Blogger.