$date = explode(“ ”,date('Y m d H i s', $unixtime)); $rewritereplace = array(
$date[0], $date[1], $date[2], $date[3], $date[4], $date[5], $post->post_name, $post->ID, $category, $author, $post->post_name,
); </code>のなかの
$post->ID,
を
sprintf("%06d",$post->ID),
とする。
「カスタム構造」に
/archives/%post_id%.html
と入力する。
記事番号も保持したまま移行するには
mt2\lib\MT\App\CMS.pmの2986行目
AUTHOR: <$MTEntryAuthor$>
の次の行に
POST_ID: <$MTEntryID$>
を追加
case '': break;
</code>の次の行に
case 'POST_ID': $post_id = $value; break;
を追加
$post_id = $wpdb->get_var("SELECT ID ……
</code>をコメントアウト
// $post_id = $wpdb->get_var("SELECT ID ……
Favatarを組み込む。スタイルシートに以下を追加
img.favatar {width: 16px; height: 16px;}
一括してピンをオープンにするMySQLのコマンド
UPDATE wp2_posts SET ping_status='open'
<li><a href=“<?php bloginfo('rss2_url'); ?>”>RSS 2.0</a></li> <li><a href=“<?php bloginfo('atom_url'); ?>”>Atom</a></li></code>
<link rel=“alternate” type=“application/rss+xml” title=“RSS 2.0” href=“<?php bloginfo('rss2_url'); ?>” /> <link rel=“alternate” type=“application/atom+xml” title=“Atom 0.3” href=“<?php bloginfo('atom_url'); ?>” /></code>
wp_includes/feed.phpの114行目
function get_the_title_rss() { $title = get_the_title(); $title = apply_filters('the_title_rss', $title); $title = "[H] ".$title; return $title; }
wp_includes/template-function-general.phpの336行目
if ( $show_post_count ) { // $text = sprintf('%s %d', $month[zeroise($arcresult->month,2)], $arcresult->year); $text = sprintf(__('%d年 %s'), $arcresult->year, $month[zeroise($arcresult->month,2)]); $after = ' ('.$arcresult->posts.')' . $afterafter; } else { // $text = sprintf('%s %d', $month[zeroise($arcresult->month,2)], $arcresult->year); $text = sprintf(__('%d年 %s'), $arcresult->year, $month[zeroise($arcresult->month,2)]); }
wp_content/themes/xxx/header.php
<?php if ( is_single() ) { ?> » Blog Archive <?php } ?>
を削除する
wp_content/themes/xxx/sidebar.php
<select onchange="nav(this)"> <option>月を選択</option> <?php wp_get_archives('type=monthly&show_post_count=1&format=option'); ?> </select> <script type="text/javascript" charset="utf-8"> function nav(sel) { if (sel.selectedIndex == -1) return; var opt = sel.options[sel.selectedIndex]; if (opt && opt.value) location.href = opt.value; } </script>
wp-include\wp-db.php
$this->dbh = @mysql_connect(…
の後ろに
mysql_query("SET NAMES utf8", $this->dbh);
を挿入