グローバルナビゲーションの順番を変えたい
-
ページ属性の順序の数字を変更してもグローバルナビの順番が変わらず困っております。
「header.php」をどのように修正すれば良いか色々と調べたのですが私の知識不足で解決できず、アドバイスお願いします。現在の環境は以下の通りです。
・woropressバージョン・・・3.0.1
・テーマ・・・StudioPress 1.2下記にheader.phpの一部を転記いたしますのでよろしくお願いいたします。
=以下コード=====
<div id=”nav”>
<?php function get_the_pa_ges() {
global $wpdb;
if ( ! $these_pages = wp_cache_get(‘these_pages’, ‘pages’) ) {
$these_pages = $wpdb->get_results(‘select ID, post_title from ‘. $wpdb->posts .’ where post_status = “publish” and post_type = “page” order by ID’);}
return $these_pages;
}function list_all_pages(){
$all_pages = get_the_pa_ges ();
foreach ($all_pages as $thats_all){
$the_page_id = $thats_all->ID;if (is_page($the_page_id)) {
$addclass = ‘ class=”current_page”‘;
} else {
$addclass = ”;
}
$output .= ‘<li’ . $addclass . ‘>ID).'” title=”‘.$thats_all->post_title.'”><span>’.$thats_all->post_title.'</span>‘;
}return $output;
}
?>-
<?php
if (is_home()) {
$addclass = ‘ class=”current_page”‘;
} else {
$addclass = ”;
}
echo “<li” . $addclass . “><span>トップページ</span>“;
echo list_all_pages();?><div class=”cleared”></div>
</div> <!– Closes Nav –><div class=”topcurvewhite”></div>
<div id=”main”>=以上======
- トピック「グローバルナビゲーションの順番を変えたい」には新たに返信することはできません。