不要な表示の消去

wordpressのindex.phpで、表示がゴチャゴチャして見づらかったので、書籍を参考に不要な表示を消去してみました。

まず、「タグ」表記を消しました。

外観>編集にあるindex.phpを開き、下記の赤字部分を消去します。
—————————————–
<p class="postmetadata"><?php the_tags(__(‘Tags:’, ‘kubrick’) . ‘ ‘, ‘, ‘, ‘<br />’); ?> <?php printf(__(‘Posted in %s’, ‘kubrick’), get_the_category_list(‘, ‘)); ?> | <?php edit_post_link(__(‘Edit’, ‘kubrick’), ”, ‘ | ‘); ?>  <?php comments_popup_link(__(‘No Comments &#187;’, ‘kubrick’), __(‘1 Comment &#187;’, ‘kubrick’), __(‘% Comments &#187;’, ‘kubrick’), ”, __(‘Comments Closed’, ‘kubrick’) ); ?></p>
—————————————–

footer.phpを開き、下記を消去します。
—————————————–
<p>
    <?php printf(__(‘%1$s is proudly powered by %2$s’, ‘kubrick’), get_bloginfo(‘name’),
    ‘<a href="http://wordpress.org/">WordPress</a>’); ?>
    <br /><?php printf(__(‘%1$s and %2$s.’, ‘kubrick’), ‘<a href="’ . get_bloginfo(‘rss2_url’) . ‘">’ . __(‘Entries (RSS)’, ‘kubrick’) . ‘</a>’, ‘<a href="’ . get_bloginfo(‘comments_rss2_url’) . ‘">’ . __(‘Comments (RSS)’, ‘kubrick’) . ‘</a>’); ?>
    <!– <?php printf(__(‘%d queries. %s seconds.’, ‘kubrick’), get_num_queries(), timer_stop(0, 3)); ?> –>
</p>
—————————————–

欠けてしまうページ最下の外観調整のため、style.cssの以下を追記します。
—————————————–
#footer {
    padding: 0;
    margin: 0 auto;
    width: 760px;
    height: 63px;
    clear: both;
}
—————————————–

これで、タグの表記が消えました。

次に、「この投稿の続きを読む ≫」の表記を短く「続きを読む≫」にします。

index.phpの以下を修正します。
—————————————–
<div class="entry">
        <?php the_content(__(‘Read the rest of this entry &raquo;’, ‘kubrick’)); ?>
</div>

↓↓↓

<div class="entry">
        <?php the_content(‘続きを読む &raquo;’); ?>
</div>
—————————————–

これで短くなりました。

//

「編集|コメントはありません」も邪魔になってきました。
冒頭の編集箇所をさらにいじります。
—————————————–
<p class="postmetadata"><?php printf(__(‘Posted in %s’, ‘kubrick’), get_the_category_list(‘, ‘)); ?> | <?php edit_post_link(__(‘Edit’, ‘kubrick’), ”, ‘ | ‘); ?>  <?php comments_popup_link(__(‘No Comments &#187;’, ‘kubrick’), __(‘1 Comment &#187;’, ‘kubrick’), __(‘% Comments &#187;’, ‘kubrick’), ”, __(‘Comments Closed’, ‘kubrick’) ); ?></p>

↓↓↓

<p class="postmetadata"><?php printf(__(‘Posted in %s’, ‘kubrick’), get_the_category_list(‘, ‘)); ?> | <?php edit_post_link(__(‘Edit’, ‘kubrick’), ”, ‘ | ‘); ?>  <?php comments_popup_link(__(‘No Comments &#187;’, ‘kubrick’), __(‘1 Comment &#187;’, ‘kubrick’), __(‘% Comments &#187;’, ‘kubrick’), ”, __(‘Comments Closed’, ‘kubrick’) ); ?></p>
—————————————–

これでスッキリしました。