Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • 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');

    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.

    Sorry, wrong login URL – correct info is below:

    Here’s info for you to login

    in reply to: Can't edit pages, Advanced Layout not working on pages #489535

    Hey there,

    Info in the private section.

    Other developments since last post:
    – I had the server upgraded to 512 MB of ram. This removed the “memory exhausted” warning but hasn’t fixed any issues.
    – I cannot customize the theme without getting a 500 error, though this happens with the 2014 theme as well…seems to be triggering a wp-cron.php error on another site in my hosting. No idea.

    My next course of action will be doing a clean WP + Theme install in another folder, then migrating my DB + files over to see if that helps.

    My CSS is all in the Custom CSS of Enfold’s Theme panel that I can’t access. Can I pull all of that enfold.css in the wp-content/uploads folder?

Viewing 5 posts - 1 through 5 (of 5 total)