<meta property="og:title" content="<?php wp_title( '|', true, 'right' ); if(is_tax('genre')): //大カテゴリ21--------------------------------- $super = single_term_title('', false); $args = array( 'posts_per_page' => 1, 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'midashi',//タクソノミー見出しの 'field' => 'slug', 'terms' => array( $super, '予備' ),//タームに現在のタームを入れるsuper※条件midashiとgenreのターム名は同じ //'operator'=>'NOT IN' ), ), 'post_type' => 'd_midashi_top', //カスタムポスト見出しトップの ); query_posts( $args ); if ( have_posts () ) : while ( have_posts() ) : the_post(); echo get_post_meta($post->ID,"見出し文",true); endwhile; endif; //genreのタクソノミーだったら終わり ?><?php endif; //else: wp_reset_query(); /* * Print the <title> tag based on what is being viewed. */ global $page, $paged; if(is_singular( 'performer' ) )://パフォーマー個--------------------------------- echo get_post_meta($post->ID,"キャッチコピー",true); echo ' '; endif; if(is_tax('chiiki')): //パフォーマー地域--------------------------------- echo 'イベントレポート '; endif; // Add the blog name. bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) echo " | $site_description"; if(is_page()): //固定ページ-------------------------------- echo " | $site_description"; endif; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ); ?>" />