Home Forums Theme Suggestions Except on home page for latest posts

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • philbotana
    Participant

    I would like to increase the size of the exceprt for each of the latest posts which appear below the slider on the home page.

    Currently they only show one line. When I try to add a custom excerpt it deletes the photo.

    I would like the latest posts undet the slider to contain an image, photo credit and the first paragraph (subject to space) of the post.

    Thanks.

    Max
    Keymaster

    Hi,

    Follow this steps to get this done:

    1. Login to your WordPress Site and perform the following steps:

    1.1. Navigate to Appearance section in the Sidebar and Click Editor

    1.2.Click the Theme Functions or “functions.php” template file

    1.3.Just above the closing ?> tag add the following code:

    Code:
    add_filter('excerpt_length', 'my_excerpt_length');
    function my_excerpt_length($length) {
    return 20; }

    2. Change 20 to the length you would like the WordPress excerpt to be in words.

    3. Update the file and and go view your site.

    Cheers,

    Max.

    beiker
    Participant

    Thanks for this.

Viewing 3 posts - 1 through 3 (of 3 total)