• Full text of posts is displayed on the front page. How can I make only the title, c.q. the title and the first lines appear? (guidothys.wordpress.com)

Viewing 4 replies - 1 through 4 (of 4 total)
  • Anwer AR

    (@aranwer104)

    Do you use static front page? or if your front page is dynamically displayed by loop then you have to modify the Loop.like following,

    if(have_posts()) : while(have_posts()) : the_post();?>
    
    <h2><?php the_title();?>
    <?php the_excerpt();?> //instead to use the_content();
    
    <?php
    endwhile;
    endif;
    ?>

    and you can control the excerpt length as your wish. to do so add the following line of codes to your functions.php

    function custom_excerpt_length( $length ) {
    	$length = 50; //or your desired value here.
            return $length;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
    Thread Starter 2minacdev

    (@thysgc)

    Thanks, Aranwer104.
    Can I attempt to qualify for the author of the Dumbo Question of the Month? 🙂
    Where can I access the php-files? (I used to have an old blog on wordpress.org where I knew where everything was, but now on wordpress.com I can only customize through the standard menu options.)
    Thanks a million.

    Anwer AR

    (@aranwer104)

    Yes why not,
    there are two versions of WordPress, self hosted blog and on WordPress.com.
    on self hosted blog you have a complete control over core files and everything. but on WordPress you cant access WordPress core php files, but you can access your theme files, if you want some modification in it. to do so Go to Appearance->Editor, you theme files are there.

    Thread Starter 2minacdev

    (@thysgc)

    Aranwer104, thanks for the info.
    I get the thing about the 2 versions now.
    Appearance->Customize (don’t have Editor on the list) allows some modifications but not the length of the posts on the front page for this theme… bummer.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Posts on front page’ is closed to new replies.