Excerpt length in category archive and search pages

  • soapy

    #23177

    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?

    Admin

    Syahir Hakim

    #23178

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

    soapy

    #23179

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

    Admin

    Syahir Hakim

    #23180

    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 );

    soapy

    #23181

    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….

    Admin

    Syahir Hakim

    #23182

    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.
Do NOT follow this link or you will be banned from the site!