« WordPress: memolinkプラグイン... Main mkdirしてcd »

WordPressで前後の記事へのリンクを追加

「サイト管理デザイン→テーマエディタ→単一記事の投稿 (single.php)」あるいは使用中のテーマのそのファイルを直接編集し、<div id=”content”>の次に、例えば以下のように追加する(_short()付き関数を使用の場合は、下部リンクのプラグインを導入のこと)。

<div align="center">
                <?php previous_post_link_short(); ?>
                || <a href="<?php echo get_option('home'); ?>">Main</a> ||
                <?php next_post_link_short(); ?>
        </div><p>

あるいは

<table border="0" width="100%" cellspacing="0" cellpadding="0">
                <td align="left"   width="33%"><?php previous_post_link_short(); ?></td>
                <td align="center" width="33%"><a href="<?php echo get_option('home'); ?>/">Main</a></td>
                <td align="right"  width="33%"><?php next_post_link_short(); ?></td>
        </table><p>

リンク

Leave a comment

Your comment