まずインフォのコード修正
d_roop/
a_info1.php
<?php
// カテゴリー情報を取得
foreach( ( get_the_category() ) as $category ):
$cat_name ='';//子
$cat_name2 ='インフォメーション';//親
if($category -> parent == 30 ){$cat_name = $category -> name;}
if($category -> term_id == 30 ){$cat_name2 = 'インフォメーション';}
endforeach;
// echo "<pre>";
// print_r($cat_name);
// echo "</pre>";
//$info_cat = get_the_category();
// echo "<pre>";
// print_r($info_cat);
// echo "</pre>";
//
//
//$info_cat1 = $info_cat[1]; // 0が親11がその子・・ファンクションの並び順をオーダー通りに出力のおかげ
//$cat_name = $info_cat1->cat_name;
//
//$info_cat2 = $info_cat[0]; //
//$cat_name2 = $info_cat2->cat_name;
?>
そしてカテゴリ
ブログ一覧に表示しない
を作成 IDを把握
fanction/
admin_site.php
$info_cat_outを修正
//インフォカテゴリ $info_cat= '30'; $info_cat_out= '-283';//任意
ループコード等修正
アーカイブ
<?php
if ( have_posts () ) :
while ( have_posts() ) :
the_post();
?>
//ここの分岐を削除
<?php include(get_stylesheet_directory() . "/roop_blog.php"); ?>
<?php
endwhile;
else:?>
<div class="top_set"><div style="font-size:12px; color:#CCC; padding-top:10px;">※記事はまだありません。</div></div>
<?php
endif;
?>
blog topなど
$info_cat_outを利用していないなら
変更
<?php query_posts('post_type=post&cat='.$info_cat_out.'&paged='.$paged); ?>