-
AuthorPosts
-
July 31, 2017 at 11:31 pm #832498
Hi best supportes ;-)
How can I reduce the length of the excerpt on the featured image slider?
I tried it in the child > functions.php with
add_filter( 'avf_feature_image_slider_excerpt_length', 'avf_feature_image_slider_excerpt_new_length', 999 ); function avf_feature_image_slider_excerpt_new_length($length) { return 10; }
but it doesn’t work.
Thanks for your input!
Best regards
StephanAugust 2, 2017 at 10:26 am #833306Hey Stephan,
To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
Best regards,
John TorvikAugust 4, 2017 at 4:35 pm #834388Hi Torvik,
I need to different excerpt lenghts: One for the big image in the magazine element, and a shorter one (roundabout 30%) for the featured slider, but I didn’t get it with “add_filter( ‘avf_feature_image_slider_excerpt_length’…”
Here’s a screenshot:
http://imgur.com/zqzH5ktThousand thanks in advance
Stephan- This reply was modified 7 years, 3 months ago by Yeti.
August 9, 2017 at 8:24 am #836228Hi,
Did you specify the excerpt manually? This filter will only work if the post has no excerpt.
Best regards,
IsmaelAugust 9, 2017 at 12:50 pm #836347Hi Ismael,
yes I edit this text manually in the extra textarea “excerpt” below the mce.
I there an alternative to “cut” this field similar to “avf_feature_image_slider_excerpt_length”?Thanks a lot + best regards
StephanAugust 10, 2017 at 9:31 am #836848Hi,
There is no filter for that, unfortunately. However, you can adjust the number of characters by using a script in the functions.php file.
function ava_custom_script_mod(){ ?> <script> (function($){ function a() { $('.avia-featureimage-slideshow .avia-caption-content').text(function(index, curr) { return curr.substr(0, 10) + ' ...'; }); } a(); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_custom_script_mod');
We set the number of characters to 10. Adjust as needed. Please note that this will limit the number of characters, not words.
Best regards,
IsmaelAugust 12, 2017 at 5:11 pm #837955Hey Gods of Support,
that’s really great. Thanks a lot!
Best wishes,
StephanAugust 12, 2017 at 5:23 pm #837964Hi! We’re glad that Ismael was able to help you! We’ll close this topic now. For any other questions or issues, feel free to post them here on the forum and we will do our best to assist you.
Thank you for using Enfold.
Cheers!
Sarah -
AuthorPosts
- The topic ‘Reducing the length of the excerpt on featured image slider?’ is closed to new replies.