Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #524119

    Hey guys,

    This is specific to using a custom excerpt (Screen Options -> Excerpt) and using a Blog Posts (Grid) or Post Slider to display posts. Currently these excerpts are not shortening using any methods I’ve found on the this forum or through other functions I’ve found.

    The custom excerpt is shortening when using non-grid layouts for posts.

    Can you help?

    #525079

    Hi grahamonak!

    Are you using the Post Slider there? Unless the post is using the link format it should be displaying the excerpt. Try deactivating all of your plugins. If that does not help then send us a WordPress login and we’ll take a look.

    Cheers!
    Elliott

    #525089

    Here’s info for you to login

    #525140

    Hey!

    I’m getting an invalid username error.

    Please double check the username you provided above.

    Cheers!
    Dake

    #525142

    Sorry, wrong login URL – correct info is below:

    #525147

    Hi!

    Like Elliot stated previously we would suggest activating the read more link in your post slider.

    Also your two latest excerpts are using the full text of the post, so it’s best to shorten it manually via the screen option excerpt:

    http://gaintapdevsite-02.com/wp-admin/post.php?post=557&action=edit

    Best regards,
    Dake

    #525156

    Setting the blog slider to “title, excerpt and read more link” does nothing for shortening the custom excerpt, I’m illustrating that on this page:

    http://gaintapdevsite-02.com/resources/case-studies/

    The top blog post is set to single author pic, the bottom blog post section is set to grid layout. It shortens on the single layout with pic setting, it doesn’t shorten for the grid layout.

    The problem with the custom excerpt not shortening appears to be related specifically to posts displaying on the grid layout.

    #525956

    Hi!

    Use this in the functions.php file:

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

    Regards,
    Ismael

    #526277

    Hi Ismael,

    Thanks but that doesn’t apply to custom excerpts. It only affects the length of the default excerpts.

    I’m talking about manually set excerpts set on the page / post at the bottom after turning on excerpts in Screen Options.

    This is the code I’m using to shorten custom excerpts that is working for posts unless they are set to post-grid layout

    function wp_trim_all_excerpt($text) {
    // Creates an excerpt if needed; and shortens the manual excerpt as well
    global $post;
      $raw_excerpt = $text;
      if ( '' == $text ) {
        $text = get_the_content('');
        $text = strip_shortcodes( $text );
        $text = apply_filters('the_content', $text);
        $text = str_replace(']]>', ']]>', $text);
      }
    $text = strip_tags($text);
    $excerpt_length = apply_filters('excerpt_length', 80);
    $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
    $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); //since wp3.3
    /*$words = explode(' ', $text, $excerpt_length + 1);
      if (count($words)> $excerpt_length) {
        array_pop($words);
        $text = implode(' ', $words);
        $text = $text . $excerpt_more;
      } else {
        $text = implode(' ', $words);
      }
    return $text;*/
    return apply_filters('wp_trim_excerpt', $text, $raw_excerpt); //since wp3.3
    }
    remove_filter('get_the_excerpt', 'wp_trim_excerpt');
    add_filter('get_the_excerpt', 'wp_trim_all_excerpt');
    #526566

    Hey!

    If you’re using the Excerpt box, why would you add a paragraph or summary that long?

    Best regards,
    Ismael

    #661279

    Basically, how do I limit the words on a custom post excerpt grid view and add a read more link at the bottom of it. I want to create a nice magazine post layout and need to use the custom post editor but miss out on all the basic functions of a regular post – can someone help? Please

    #661716

    Hi @paulseager,

    Please open a new thread and include admin login details in private so that we can have a closer look.

    Thanks,
    Rikard

    #661728

    Thanks for this…

    #662958

    Hi,

    this is basic/default WordPress behavior, so refer to:

    and

    Let us know if you have any specific theme related issues/questions.

    Best regards,
    Andy

    #664174

    Hi Richard… back of holidays now… Included the log in details for the site in question.. I am struggling to limit the excerpts when using the post Advanced builder in Enfold. Also How do you add a read more in the excerpt. I really want the article to behave like a normal blog but I still need to design the post an make it look more attractive. Can you help please?

    #664176

    It is specifically when using the Blog Post Grid layout that I am struggling. Thanks

    #664552

    Hi,

    when using ALB for blog posts you’re losing any WordPress’ default blog behavior. This means you have to do everything from scratch, including any excerpts.

    Best regards,
    Andy

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