lab

●wordpressのデフォルトテーマ 
 twenty ten の本文中(the_content)の「続きを読む」の変更方法


loop.phpをdreameweaverで開き

<?php else : ?>
    <div class="entry-content">
    <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
    <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
    </div><!-- .entry-content -->
<?php endif; ?>

137段目の'Continue reading'を任意の言葉に変更する。


●wordpressのデフォルトテーマ
 twenty ten の抜粋(the_excerpt)の「続きを読む」の変更方法


function.phpをdreameweaverで開き

return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a>';

299段目の'Continue reading'を任意の言葉に変更する。
トップページに新着の抜粋記事を3件表示して(<?php the_content(); ?>の代わりに<?php the_excerpt(); ?>を挿入)その下にその他の最新記事などと表示したい場合

<?php
$lastposts = get_posts('numberposts=7&offset=3&orderby=post_date');
foreach($lastposts as $post) :
setup_postdata($post);
?>

offset=3と書いて前の3件を飛ばす。


あと....
wordpressの抜粋に自動的にサムネイルを表示するプラグイン
という記事を発見。

配布元

これも何かに使えそうなのでチェックしておこう。

 1  |  2  |  3  |  4  |  5  | All pages