Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #489163

    Hi there!
    I found this code in another thread about setting a character limit on excerpts and added it to functions.php:

    /*
    * add_filter('avf_postgrid_excerpt_length','avia_change_postgrid_excerpt_length', 10, 1);
    function avia_change_postgrid_excerpt_length($length)
    {
       $length = 100;
       return $length;
    }

    However, when you go to the following pages, you’ll notice the excerpt length is a LOT less than 300 characters.

    Page 1
    Page 2
    Page 3

    EXCEPT on this page where the length of the excerpt can be short or very long:
    Page 4

    Any ideas on where I went wrong?

    • This topic was modified 8 years, 7 months ago by thelistener.
    #489195

    Hi!

    I think the code should be:

    add_filter('avf_postgrid_excerpt_length','avia_change_postgrid_excerpt_length', 10, 1);
    function avia_change_postgrid_excerpt_length($length)
    {
       $length = 100;
       return $length;
    }

    Regards,
    Josue

    #489202

    I added that to the bottom of the functions.php page and it’s still showing up just the same as it was before…ugh!

    #489205

    Hi!

    Are you copying the code from the forum or from the email?
    Let us know!

    Best regards,
    Basilis

    #489209

    From the forum (see screenshot)

    #489235

    Hi,

    Can you please create us a WordPress administrator account? post it here as a private reply.

    Regards,
    Josue

    #489241

    Here you go! :-)

    #489268

    Hi!

    Check it now.

    Best regards,
    Josue

    #489575

    Maybe I’m missing something, but it still looks the same.

    #489716

    Hi!

    Can you post a screenshot of your view? here’s how it looks on my end – http://screencast.com/t/wv2orC02

    Regards,
    Josue

    #489804

    I see that now…where did you input the updated code? I’d like to reduce the amount of characters in the excerpt. THANKS AGAIN!!!!!!!!!!!!!!

    #489812

    Hey!

    Check in Plugins > Edit Functions.

    Regards,
    Josue

    #489816

    Josue, you are the man. THANKS!

    #489833

    You are welcome, glad to help :)

    Regards,
    Josue

    #490599

    Hi!

    happy you got the problem solved, I will now lock the topic here, feel free to open a new one if you need assistance.

    Cheers!
    Basilis

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Excerpt Length functions.php fix not working’ is closed to new replies.