この度、Stinger3 betaを公開しました。
従来のStinger2のアドセンス1つで柔軟に対応するタイプには一区切りつけ、Stinge3としました。主に、スマートフォンへの最適化です。SEO効果は従来のものと変わりませんが、アクセス、アドセンス効果は上がるかと思います。(事実、僕は上がっています)
変更点は以下の通りです。
スマートフォン表示の最適化
- 縮小表示をやめ、PCとの表現をなるべく統一しました。
- 画像、Youtubeなどの自動縮小
アドセンスの拡大
上記により、アドセンスがさらに目立ちます。
iPadの表示最適化
iPadのレイアウトを修正しました。
Stinger3の注意点
スマートフォン用アドセンスの追加
スマートフォンへ適正化する為に、アドセンスのサイズを条件分岐しています。
(初心者向けの為、レスポンシブではなく別途300×250pxのアドセンスをウィジェットで設定します。)
アドセンスで、スマホ用に「300×250レクタングル」を別途取得。
(今までのモノはPC用にそのままでOK)
WordPressの管理画面の「ウィジェット」に新しく「Googleアドセンスのスマホ用」があるので追記
以上で完了です。
本当はもう少しいろいろ精査したい部分や
コードも綺麗にしたかったのですが、時間がとれずいつになるやらなので
ひとまず公開とさせて頂きました。
差分は後ほどお知らせしますが、
現在報告いただいているのはショートコードが上手く表示されないという点です。
また、Stinger2の途中より記載いしていたfunctions.phpの
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
//サイズ指定 function thumbnail_size_setup() { if(update_option('thumbnail_size_w', 150)) { update_option('thumbnail_size_h', 150); } if(update_option('medium_size_w', 400)) { update_option('medium_size_h', auto); } if(update_option('large_size_w', 546)) { update_option('large_size_h', auto); } } add_action('after_setup_theme', 'thumbnail_size_setup'); /* Name : Resize an image at upload * Version: 1.0.0 * Author : Otokuni Consulting Co.,Ltd. * Author URI: http://www.oto-con.com/ * License: GPLv2 or later * Description : This function is useful when the user often upload very large size image. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ function otocon_resize_at_upload( $file ) { // $file contains file, url, type // array( 'file' => 'path to the image', 'url' => 'url of the image', 'type' => 'mime type' ) // resize only if the mime type is image if ( $file['type'] == 'image/jpeg' OR $file['type'] == 'image/gif' OR $file['type'] == 'image/png') { // set width and height $w = intval(get_option( 'large_size_w' ) ); // get large size width $h = intval(get_option( 'large_size_h' ) ); // get large size height // get the uploaded image $image = wp_get_image_editor( $file['file'] ); // if no error if ( ! is_wp_error( $image ) ){ // get image width and height $size = getimagesize( $file['file'] ); // $size[0] = width, $size[1] = height if ( $size[0] > $w || $size[1] > $h ){ // if the width or height is larger than the large-size $image->resize( $w, $h, false ); // resize the image $final_image = $image->save( $file['file'] ); // save the resized image } } } // if mime type return $file; } add_action( 'wp_handle_upload', 'otocon_resize_at_upload' ); |
を削除しています。
凄く便利なコードなのですが、画像処理が出来ない点があるので各自カスタマイズ範囲としました。記載した方が便利です。
詳細はコチラ→WordPressの表示速度が驚くほど高速に!Stingerがより快適になりました。
Stinger3はこちら(ver20130906)
WordPressテーマ「Stinger」ご利用に関して
ご利用規約
※ご利用に関するトラブルには一切責任を負いかねます。
上記をお守りいただける方のみ、ダウンロードして下さい。
【必ずお読み下さい】
※Stingerでいるもの、いらないもの
※テーマの不具合やアップデート情報はTwitterにて告知しています。
できればフォローお願いします。
※WPのバージョン3.5以上
【ダウンロードファイル】
20131012ver
※現在の1012は不具合などを改善した最新verですが、変更点などのアナウンスが間に合っておりません。
VerUPの場合は「デモサイト」を御確認の上、ご利用下さい。
[download id="951"]