Support » Themes and Templates » limit number of words in twenty ten font page

  • Resolved vishalkhialani

    (@vishalkhialani)


    Hi,
    I am currently theming my site. I am using a custom child theme of twenty ten.

    My site is http://www.iamvishal.com and I can’t seem to get the word count in control I just want 20 words per post to show up.

    I tried to change the setting in wp-admin > reading > to summary
    and I also tried to change it in the loop.php file but I am not able to get it done.

    Any ideas ?

    Cheers,
    Vishal

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    1. to display excerpt in the fron page, around line 137 in loop.php,

    find this <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>

    try replacing with this:

    <?php if ( is_home() || is_front_page() || is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>

    2. to limit the excerpt length, review this codex:

    http://codex.wordpress.org/Function_Reference/the_excerpt

    Hi t-p,
    Thanks it worked I had visited that page earlier but missed the logic.

    I have another problem now. My preview image of each post has disappeared. How can I get that back ?

    I am new to coding in wp.

    thank you,
    Vishal

    Moderator t-p

    (@t-p)

    Vishal, try checking path in Admin => Settings => Media

    Hi,
    I managed to get it done. I did a bit of reading of the php files and more searches using my old pal google.

    I implemented the below in the loop.php and for the functions.php I added it as a feature.

    <?php the_post_thumbnail( $size, $attr ); ?>

    cheers,
    vishal

    Moderator t-p

    (@t-p)

    Glad you got it done Vishal. 🙂

    Please mark thread as “resolved” using the dropdown in the right panel so that others with similar problem can see it as “resolved” and will read this thread for help if they have similar problem.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘limit number of words in twenty ten font page’ is closed to new replies.