Summary of my WordPress

2009 年 2 月 8 日 コメントをどうぞ コメント

テーマに取り込んでいる改造

「ページのタイトル」 | 「ブログ名」 と表示
Default テーマ カスタマイズ! 「タイトル表示」編 | orioa
デフォルトテーマなら header.php を書き換えればOK

WP-PageNavi を使わずにナビゲーション表示
yuriko先生のYuriko.Net ≫ WP-PageNavi を使わずにナビゲーション表示を参考にして、
index.phpの

		<div class="navigation">
<div class="alignleft"><?php next_posts_link('&amp;amp;amp;amp;laquo; Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries &amp;amp;amp;amp;raquo;') ?></div>
</div>

<div class="tablenav"><?php echo paginate_links( array(
'base' => get_pagenum_link(1) . '%_%',
'format' => 'page/%#%/',
'total' => $wp_query->max_num_pages,
'mid_size' => 3,
'current' => ($paged ? $paged : 1),
)); ?></div>

に書き換え
スタイルシートに、
[sourcecode lang='css'].tablenav {
color: #2583ad;
background:white;
margin: 1em auto;
line-height:2em;
text-align:center;
}

a.page-numbers, .tablenav .current {
padding: 2px .4em;
border:solid 1px #ccc;
text-decoration:none;
font-size:smaller;
}

a.page-numbers:hover {
color:white;
background: #328ab2;
}

.tablenav .current {
color: white;
background: #328ab2;
border-color: #328ab2;
}

.tablenav .next, .tablenav .prev {
border:0 none;
background:transparent;
text-decoration:underline;
font-size:smaller;
}

を追加。

K2 Data Stamp をデフォルトテーマで表示
date stamp 1.2 update at stevelam.orgをデフォルトテーマでも利用する方法です。
しかし、プラグインは使わずにテーマに直接移植します。

			<div class="post" id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

			<div class="post" id="post-<?php the_ID(); ?>">
<div class="date-stamp"><span class="ds-row1"><?php the_time('M') ?></span><span class="ds-row2"><?php the_time('j') ?></span><span class="ds-row3"><?php the_time('Y') ?></span></div>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

に置き換え
スタイルシートに

/*
Date Stamp
*/
 
.date-stamp {
float: left;
text-align: center;
width: 45px;
margin: 0 10px 10px 0;
}
 
.date-stamp span.ds-row1 {
background: #27d;
color: #fff;
}
 
.date-stamp span.ds-row2 {
font-size: 1.3em;
font-weight: bold;
background: #fff;
border: 1px solid #ddd;
border-top: none;
}
 
.date-stamp span.ds-row3 {
background: #eee;
border: 1px solid #ddd;
border-top: none;
}
 
.date-stamp span.ds-row1, .date-stamp span.ds-row2, .date-stamp span.ds-row3 {
padding: 3px;
display: block;
}
 
.date-stamp span.ds-row1 {
background: url('images/ds_large_top.png') top no-repeat;
border: none;
border-bottom: 1px solid #999;
padding: 3px 0 2px;
}
 
.date-stamp span.ds-row2 {
background: url('images/ds_large_middle.png') center repeat-y;
border: none;
border-bottom: 1px solid #999;
padding: 0;
}
 
.date-stamp span.ds-row3 {
background: url('images/ds_large_bottom.png') bottom no-repeat;
border: none;
padding: 2px 0 3px;
}
 
.comment .date-stamp span.ds-row1 {
background: url('images/ds_small_top.png') top no-repeat;
border: none;
border-bottom: 1px solid #999;
padding: 3px 0 2px;
}
 
.comment .date-stamp span.ds-row2 {
background: url('images/ds_small_middle.png') center repeat-y;
border: none;
border-bottom: 1px solid #999;
padding: 0;
}
 
.comment .date-stamp span.ds-row3 {
background: url('images/ds_small_bottom.png') bottom no-repeat;
border: none;
padding: 2px 0 3px;
}

を追加

トラックバックアドレスの表示を変更
single.php の中ごろにコードを追加。

<?php if ( pings_open() ) : ?>
TrackBack <abbr title="Universal Resource Locator">URL</abbr>:<input type="text" name="trackback_url" size="60" value="<?php trackback_url() ?>" readonly="readonly" class="trackback-url" onfocus=" this.select()" />
<?php endif; ?>

不要と思われる、トラックバックのコードなどを削除。

  1. コメントはまだありません。
  1. トラックバックはまだありません。