1. 内部ALT
2.h&Pマークアップ(h1タグ変動かどうか)
3.タイトルタグ
4.ディスプリクションキーワード
5.facebook ogp アプリID
6.アナティリスク&WEBマスター
1. 内部ALT
2.h&Pマークアップ(h1タグ変動かどうか)
3.タイトルタグ
4.ディスプリクションキーワード
5.facebook ogp アプリID
6.アナティリスク&WEBマスター
add_action( 'pre_get_posts', 'foo_modify_query_post_order' );
function foo_modify_query_post_order( $query ) {
if ( $query->is_tax('genre') && $query->is_main_query() ) {
$query->set( 'orderby', 'menu_order' );
$query->set( 'order', 'DESC' );
}
}
add_action( 'pre_get_posts', 'foo_modify_query_post_order2' );
function foo_modify_query_post_order2( $query ) {
if ( $query->is_tax('test') && $query->is_main_query() ) {
$query->set( 'orderby', 'menu_order' );
$query->set( 'order', 'DESC' );
}
}
参考http://gatespace.jp/2012/09/10/modify_main_queries/
<?php
/**
* pre_get_posts を使ってメインクエリーを書き換える
* http://notnil-creative.com/blog/archives/1996
*/
add_action( 'pre_get_posts', 'foo_modify_main_query' ); // pre_get_postsにフック
// フック時に使う関数
function foo_modify_main_query( $query ) {
if ( is_admin() || ! $query->is_main_query() )
return;
if ( $query->is_home() ) { // ホーム
$query->set( 'post_type', array( 'post', 'news' ) ); // 投稿とカスタム投稿タイプ news を含める
return;
}
if ( $query->is_month() ) { // 月別アーカイブ
$query->set( 'posts_per_page', -1 ); // すべて表示
return;
}
if ( $query->is_category() ) { // カテゴリーアーカイブ
$query->set( 'posts_per_page', 10 ); // 10件ずつ表示
return;
}
}
サムネイル画像リサイズ
regenerate-thumbnails
http://www.memo.d-marking.com/?p=779
TinyMCE Advanced
TypePad emoji for TinyMCE
(シンプルライトボックスと被るので別の
wp-jquery-lightbox
を使う
古いバージョンならOK)
PS Disable Auto Formatting
開発時
Duplicate Post
記事コピー
http://www.webopixel.net/javascript/507.html
<!--画像カレントホバー-->
<script type="text/javascript" >
$(function(){
$(".d_navi_main_in li:not(.chill):not(.current)").each(function(){ //ここ大事
var a = $(this);
var img = a.find("img");
var src_off = img.attr("src");
var src_on = src_off.replace(/^(.+)_off(\.[^\.]+)$/,"$1_on$2");
$("<img />").attr("src",src_on);
a.bind("mouseenter focus", function(){
img.attr("src", src_on);
});
a.bind("mouseleave blur", function(){
img.attr("src", src_off);
});
});
});
//current表示
$(function() {
if ($('.d_navi_main_in li').hasClass('current')) {
$(".d_navi_main_in li.current img").attr("src",$(".d_navi_main_in li.current img").attr("src").replace(/^(.+)_off(\.[^\.]+)$/,"$1_current$2"));//ここ大事
}
});
</script>
まず普通に 出てる状態を作り
消して
ホバーで見せる
hidden 0がポイント
参考
http://weboook.blog22.fc2.com/blog-entry-359.html
<li class="line"><img src="img/menu/line.png" width="1" height="29" /></li> <li><img src="img/menu/menu-04_off.jpg" width="127" height="61" /> ここから <ul class="drop_down"> <li class="chill"><a href="<?php echo home_url(); ?>/?page_id=34">尾張旭店</a></li> <li class="chill"><a href="<?php echo home_url(); ?>/?page_id=37">日進店</a></li> </ul> ここまで </li> <li class="line"><img src="img/menu/line.png" width="1" height="29" /></li>
.drop_down{
z-index: 10000;
overflow: visible!important;
position: absolute;
width: 127px;
}
.drop_down li{
width: 100%;
background-color: #24AC66;
/*ここで隠し*/
height: 0px!important;
overflow:hidden!important;
/*/ここで隠し*/
}
/*ここでみせる*/
.d_navi_main_in ul li:hover .drop_down li{
height: auto!important;
overflow: visible!important;
}
/*/ここでみせる*/
.drop_down li a{
color: #FFF;
background-color: #2CB370;
text-align: center;
width: 100%;
display: block;
padding-top: 10px;
padding-bottom: 10px;
}
.drop_down li a:hover{
/*background-color: #ff8e00;*/
text-decoration: none;
background-color: #74491C;
}
マイナスマージンが決め手
オーバーフロー hidenも注意 使わない
<!------------------タブ店舗全ページ----------------------------------> <ul class="tab_menu"> <li><a href="<?php echo home_url(); ?>/?page_id=34" class="current">尾張旭店</a></li> <li><a href="<?php echo home_url(); ?>/?page_id=37">日進店</a></li> <div style="clear:both"></div> </ul> <!------------------/タブ店舗全ページ---------------------------------->
/*タブ*/
.tab_menu{
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #CCC;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 10px;
margin-top: 10px;
margin-right: 0px;
margin-bottom: 30px;
margin-left: 0px;
}
.tab_menu li{
float: left;
list-style-type: none;
margin-bottom: -1px;
margin-left: -1px;
}
.tab_menu li a{
display: block;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #CCC;
border-right-color: #CCC;
border-bottom-color: #CCC;
border-left-color: #CCC;
padding-top: 5px;
padding-right: 25px;
padding-bottom: 5px;
padding-left: 25px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
}
.tab_menu li a:hover{
color: #FFF;
background-color: #00A550;
text-decoration: none;
}
.tab_menu li a.current{
background-color: #6a3906;
color: #FFF;
border-bottom-color: #FFF;
}
&iwloc=B
<a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php
if(mb_strlen($post->post_title)>20) { $title= mb_substr($post->post_title,0,20) ; echo $title. ・・・ ;
} else {echo $post->post_title;}?></a>
クエリポスト
'cat=2,6,17,38' 'category__in' => array( 2, 6 )
l で日曜日 とかでる
//サムネイルサイズ増やす trueが強制切り抜き
add_image_size( 'jirei_big', 703, 467,true);//ギャラリー横用
add_image_size( 'jirei_big_height', 703, 467); //ギャラリー正方形 縦用
add_image_size( 'jirei_small', 110, 110, true );
add_image_size( 'blog_sam', 230, 153, true );
add_image_size( 'side_new_post_sam', 68, 68, true );
//タイトルを入力してくださいを変える
function change_default_title( $title ) {
$screen = get_current_screen();
if ( 'shop' == $screen->post_type ) {
$title = '店舗名をご入力ください。';
} else if ( 'shop_profiless' == $screen->post_type ){
$title = 'ブログニックネームを入力';
} else if ( $screen -> post_type == 'post' ) {
$title = 'これは投稿だけ変更します';
}
return $title;
}
add_filter('enter_title_here', 'change_default_title');
//管理フッターテキスト
function remove_footer_admin () {
echo 'サイト名';
}
add_filter('admin_footer_text', 'remove_footer_admin');
//投稿後カテゴリ階層維持
function lig_wp_category_terms_checklist_no_top( $args, $post_id = null ) {
$args['checked_ontop'] = false;
return $args;
}
add_action( 'wp_terms_checklist_args', 'lig_wp_category_terms_checklist_no_top' );
//管理メニュー追加
function test_menu_page() {
$siteurl = get_option( 'siteurl' );
?>
<div class="wrap">
<h2>登録ガイド</h2>
<?php include("tebiki.php"); ?>
</div>
<?php
}
function test_admin_menu() {
add_menu_page( '登録ガイド', '登録ガイド', 'read',
__FILE__, 'test_menu_page' );
}
add_action( 'admin_menu', 'test_admin_menu' );
//管理バー消す管理者以外
//function my_function_admin_bar(){
//return false;
//}
//add_filter( 'show_admin_bar' , 'my_function_admin_bar');
//管理バー消す管理者以外
//function my_function_admin_bar($content) {
//return ( current_user_can("administrator") ) ? $content : false;
//}
//add_filter( 'show_admin_bar' , 'my_function_admin_bar');
//管理画面css
function wp_custom_admin_css() {
echo "\n" . '<link rel="stylesheet" type="text/css" href="' .get_bloginfo('template_directory'). '/custom-admin-css.css' . '" />' . "\n";
}
add_action('admin_head', 'wp_custom_admin_css', 100);
//ログイン画面css
function login_css() {
echo '<link rel="stylesheet" type="text/css" href="'.get_bloginfo("template_directory").'/login.css">';
}
add_action('login_head', 'login_css');
====http://ja.forums.wordpress.org/topic/3063=====
// 投稿画面の [表示オプション|表示する項目]のオプション値をフィルタする
function my_get_user_option_meta_box_hidden_post($result, $option, $user){
return array('postexcerpt', 'trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'slugdiv', 'authordiv', 'revisionsdiv', 'tagsdiv-post_tag');
}
add_filter('get_user_option_metaboxhidden_post', 'my_get_user_option_meta_box_hidden_post', 10, 3);
add_filter('get_user_option_managepostcolumnshidden', 'my_get_user_option_meta_box_hidden_post', 10, 3);
// 投稿画面の[表示オプション|スクリーンレイアウト|列の数]のオプション値をフィルタする
function my_get_user_option_screen_layout_post($result, $option, $user){
return 2;
}
add_filter('get_user_option_screen_layout_post', 'my_get_user_option_screen_layout_post', 10, 3);
// カテゴリ->カスタムフィールド->公開 に毎回並び替える
function my_footer() {
echo '<script type="text/javascript">
//<![CDATA[
jQuery(function(){
jQuery("#normal-sortables").prepend(jQuery("#side-sortables").children("#categorydiv"));
jQuery("#normal-sortables").append(jQuery("#side-sortables").children("#submitdiv"));
jQuery("#categorydiv").prependTo(jQuery("#normal-sortables"));
jQuery("#submitdiv").appendTo(jQuery("#normal-sortables"));
});
//]]>
</script>';
}
add_action('admin_footer', 'my_footer');
====セットhttp://ja.forums.wordpress.org/topic/3063=====
//特定のカテゴリと特定のタグで絞った記事数の表示方法
function taxonomy_found_posts_num() {
$args = array(
'post_type' => array('shoku','asobu','share','seikatsu','iryou','manabu','koukyou','ofuroyado'), //カスタム投稿名
);
$my_query = new WP_Query($args);
return $my_query->found_posts;
}
//表示箇所に
//<?php echo taxonomy_found_posts_num('hokkaido','タグ1'); 件<br />
//<?php echo taxonomy_found_posts_num('aomori','タグ2'); 件
イラストEPS等まとめ
http://web-mimemo.com/web/illust_material/
NEWアイコン
http://sozai.akuseru-design.com/category/sozai/text/page/2/
<!---Top画像2があればこのスクリプトを読む-->
<?php
$args = array(
'posts_per_page' => -1,
'paged' => $paged,
'orderby' => 'menu_order',
'order' => 'ASC',
//'tax_query' => array(
// 'relation' => 'AND',
// array(
// 'taxonomy' => 'event',
// 'field' => 'slug',
// 'terms' => array( 'トップ用', '予備' ),
//'operator'=>'NOT IN'
// ),
//),
'post_type' => 'd_midashi', //カスタム投稿名
);
?>
<?php
query_posts( $args );
?>
<!--★★★ループ基本-->
<?php
if ( have_posts () ) :
while ( have_posts() ) :
the_post();
?>
<?php if(post_custom('toppage画像2')): ?>
<!--TOPフェード-->
<script type="text/javascript">
$(function(){
var setImg = '#main_contents_top';
var fadeSpeed = 1500;
var switchDelay = 5000;
$(setImg).children('img').css({opacity:'0'});
$(setImg + ' img:first').stop().animate({opacity:'1',zIndex:'20'},fadeSpeed);
setInterval(function(){
$(setImg + ' :first-child').animate({opacity:'0'},fadeSpeed).next('img').animate({opacity:'1'},fadeSpeed).end().appendTo(setImg);
},switchDelay);
});
</script>
<?php endif; ?>
<?php
endwhile;
endif;
?>
<?php wp_reset_query(); ?>
<!---/Top画像2があればこのスクリプトを読む-->
DNSレコード設定
DNSレコード設定を利用する
test.doggstarpromotion.comを作成
サブドメイン type A 3600 ip 203.189.109.200
DNSレコード設定用ネームサーバー変更確認はチェックしない
理由 既存のページのネームサーバーは変わると困る。
すぐに独自ドメイン追加でサブドメインを追加してみたが
トップレベルドメイン【.doggstarpromotion.com】は、使用できません。[fixedPart.1]
と出た。
少し反映するまでまとう
2時間ほど3時間まで
その後独自ドメインを設定して メールを設定してみよう
ロリポップはできないみたいだ
今度はサクラで調整
http://ma3eng.com/2012/06/05/quick-cache/
スマフォようとかだとだめ
ろぐあうとしんとだめ
.grid .featured-content .entry-headerに背景cssあり
カテゴリで分岐の場合ソースへ
content-featured-post.phpへ
div entry-headerに直接スタイルで分岐
<?php if(in_category(4)): $fc='#ffc200'; elseif(in_category(6)): $fc='#0084ff'; elseif(in_category(5)): $fc='#ff6b65'; endif; ?> <header class="entry-header" style="background-color:<?php echo $fc?>; border-color:<?php echo $fc?>;">
4000番台@media screen and (min-width: 1260px)
よりあとにこれ
4分割して 4段でクリアボス(3段はノーマルに戻す)
@media screen and (min-width: 1600px){
.grid .featured-content .hentry {
width: 25%;}
.grid .featured-content .hentry:nth-child( 3n+1 ) {
clear: none;
}
.grid .featured-content .hentry:nth-child( 4n+1 ) {
clear: both;
}
Photospace Responsive
http://thriveweb.com.au/the-lab/photospace-responsive/
http://wordpress.org/plugins/photospace-responsive/
http://blog.openmedialabo.net/5698
http://thriveweb.com.au/photospace-plugin-examples/horizontal-responsive-layout/
こいつでもレスポンシブになるらしいが
ちょっときょどうがおかしかったが参考cっs
やはりパーセンテージだね
.photospace {
position:relative;
margin-bottom: 20px !important;
min-height: 200px; /* space for loader */
}
.photospace,
.photospace .thumnail_col,
.photospace .gal_content,
.photospace .slideshow-container,
.photospace .slideshow span,
.photospace .slideshow a.advance-link,
.photospace .slideshow img{
width: 100% !important;
height: auto !important;
}
.photospace .slideshow span{
display: block !important;
}
.photospace .gal_content{
float: none !important;
}
.photospace .slideshow span{
position: relative !important; /* Keep the gallery height – Doesn’t work with synced transistions */
}
.photospace .loader{
width: 100px !important;
height: 100px !important;
top: 50% !important;
left: 50% !important;
margin-left: -50px;
}
.photospace .thumbs_wrap2{
min-height:45px; /* space for thumbnails */
overflow: hidden;
}
.photospace .thumbs{
min-height:40px;
}
.photospace .thumbs_wrap{
float: left;
left: 50%;
position: relative;
}
.photospace .pageLink.next{
margin-right:0;
}
.photospace .thumnail_col {
float: left;
left: -50%;
width:auto !important;
position: relative;
}
.photospace ul.thumbs {
float:left;
}
.photospace span.image-caption{
position: inherit !important;
}
14は一番最初にかいてあったわ
ヘッダークリーナーの効力で 位置が変わって解らなくて 2時間位無駄に迷った
その産物
ファンクション500行あたり
見覚えのあるコードがここに
function twentyfourteen_wp_title( $title, $sep ) {
global $paged, $page;
if ( is_feed() ) {
return $title;
}
// Add the site name.
$title .= get_bloginfo( 'name' );
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) {
$title = "$title $sep $site_description";
}
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 ) {
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
}
return $title;
}
add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );
これはwp_titleにひっかけるフッックってやつだ
このように細工した
function twentyfourteen_wp_title( $title, $sep ) {
global $paged, $page;
if ( is_feed() ) {
return $title;
}
// Add the site name.
$title .= get_bloginfo( 'name' );
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) {
$title = "$title $sep $site_description |邦楽 J-POP アコースティック";
}
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 ) {
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
}
return $title;
}
add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );
これじゃ全部はかわらんもんで
あとはヘッダー
<title><?php wp_title( '|', true, 'right' ); ?></title>
(区切り文字 $display 右だ)
こいつを色々
<?php if(is_category(4))://カテゴリ:ライブスケジュールの場合
$ccc = '今後の';
elseif(is_page( '62' )):
$ccc = '過去の';
endif;
if(in_category(4) and is_single() )://カテゴリ:ライブスケジュールの場合
$d_day= get_the_time('Y年m月d日 ');
$d_live= 'LIVE ';
endif;
$ddd = ' | 邦楽 J-POP アーティスト | 愛知 岐阜 三重';
?>
<title><?php echo $d_live,$ccc, wp_title( '|', true, 'right' ); echo $ddd;?></title>
<meta property="og:title" content="<?php echo $d_day, the_title(); ?> | 中村愛香.jp" />