Forum Replies Created
-
AuthorPosts
-
October 28, 2015 at 4:51 pm in reply to: Excerpt Length for Custom Excerpt on Post Grid / Post Slider #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');
October 26, 2015 at 7:30 pm in reply to: Excerpt Length for Custom Excerpt on Post Grid / Post Slider #525156Setting 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.
October 26, 2015 at 7:02 pm in reply to: Excerpt Length for Custom Excerpt on Post Grid / Post Slider #525142Sorry, wrong login URL – correct info is below:
October 26, 2015 at 5:42 pm in reply to: Excerpt Length for Custom Excerpt on Post Grid / Post Slider #525089Here’s info for you to login
August 18, 2015 at 3:14 pm in reply to: Can't edit pages, Advanced Layout not working on pages #489535Hey 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?
-
AuthorPosts