/archives/%post_id%.html
と入力する。
記事番号も保持したまま移行するには
AUTHOR: <$MTEntryAuthor$>
の次の行に
POST_ID: <$MTEntryID$>
を追加
switch($key) { case '': break;
の次の行に
case 'POST_ID': $post_id = $value; break;
を追加
$post_id = $wpdb->get_var("SELECT ID ……
をコメントアウト
// $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>
<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'); ?>" />
wpincludes/feed.phpの114行目<code php> function getthetitlerss() {
$title = get_the_title();
$title = apply_filters('the_title_rss', $title);
$title = "[H] ".$title;
return $title;
}</code>
wpincludes/template-function-general.phpの336行目
<code php>
if ( $showpostcount ) {
$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)]);
}
</code>
===== 個別記事のタイトルに「Blog Archive」という文字が入ってしまう =====
wpcontent/themes/xxx/header.php
<code php><?php if ( issingle() ) { ?> » Blog Archive <?php } ?>
</code>を削除する
===== 月別アーカイブを折りたたみにする =====
wpcontent/themes/xxx/sidebar.php
<code php>
<select onchange=“nav(this)”>
<option>月を選択</option>
<?php wpgetarchives('type=monthly&showpost_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>
</code>
===== xreaのデータベース文字化け対策 =====
wp-include\wp-db.php
<code php>$this→dbh = @mysqlconnect(…</code>
の後ろに
<code php>mysqlquery(“SET NAMES utf8”, $this→dbh);</code>
を挿入
===== プラグインの自動アップデート =====
セーフモードのFTPだと、プラグインの自動アップデートに失敗してしまいます。
wp-config.phpに
<code php>define('WPTEMPDIR', '/virtual/xxx/tmp/');</code>