Excerpt length in category archive and search pages

  • soapy


    Syahir, that produces this error on my site now:

    Fatal error: Call to undefined function graphene_set_excerpt_length() in /home/delgreco/public_html/wp-content/themes/graphene-child/functions.php on line 31

    Any ideas?


    Syahir Hakim


    I just tried this and it works. You’re using Graphene 1.6 right?



    No….I haven’t updated yet…still on 1.5.6….but could this really be the cause?


    Syahir Hakim


    Hurm, if you’re on 1.5.6, the code that I posted earlier should work. The newer code that I posted is for 1.6.

    Try this:

    function custom_excerpt_length($length) {
    return 40; // Change this to whatever you want.
    add_filter('excerpt_length', 'custom_excerpt_length', 20 );



    Syahir, the last one there did it! Thank you!

    One question…when I update to 1.6…it sounds like this will no longer work, correct? I’ll have to use the code you previously pasted in this thread? Or am i wrong….


    Syahir Hakim


    It should still work, but if not, you know what to try.

Viewing 6 posts - 11 through 16 (of 16 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.