WordPress.org

Ready to get started?Download WordPress

Forums

Excerpt Versions (4 posts)

  1. czone
    Member
    Posted 3 years ago #

    I am creating a new theme where I need Excerpt in different lengths
    i.e. For Slide Show the length of 30, for Blog page 50, for one sidebar widget 20.

    I defined Excerpt length in function.php

    function new_excerpt_length($length) {
    	return 50;
    }
    add_filter('excerpt_length', 'new_excerpt_length');

    Can someone help me built more then one level or version of Excerpt that can be used in various locations.

  2. czone
    Member
    Posted 3 years ago #

    any clue how to do that :(

  3. fonglh
    Member
    Posted 3 years ago #

    use if statements with conditional functions.

  4. czone
    Member
    Posted 3 years ago #

    thanks Fonglh .... it never crossed my mind lol

Topic Closed

This topic has been closed to new replies.

About this Topic