Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #837281

    Hi Guys!

    First as always, thanks for creating the best WP theme out there in my opinion. :-)

    I’ve read the topic at https://kriesi.at/support/topic/default-excerpt-length-for-grid-layout/, and that issue is still a problem now four years later in Enfold version 4.1.2. Excerpts are a good length except for grid layout in which they’re way too short. I tried the following code in the child theme’s functions.php file to no avail.

    add_filter('custom_excerpt_length','avia_change_excerpt_length');
    function avia_change_excerpt_length()
    {
      return 240;
    }

    I found “$prepare_excerpt = …” on line 447 of …postslider.php, saw that it was using $excerpt_length, and found where $excerpt_length was set earlier in the code. On line 394 it’s being set to only 60, which is roughly the length of the excerpts that are too-short. On line 397 there’s an if() statement that sets it to 240, but for some reason the condition apparently isn’t true when using grid layout. I changed the value on line 394 to 240, and now excepts in grid layout are a good length.

    So the question is, is there a way I can set this value in the child theme’s functions.php file so I don’t have to remember to fix this every time Enfold is updated???

    Thanks!

    Scott

    #838953

    Hey scotthco,

    You can convert the postslider shortcode to a child theme call, by using

    Let us know if you need anything else.

    Best regards,
    Basilis

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.