With the following snippet, you can take control of the various slider texts length in the Customizr theme :
- title (default 80 chars),
- lead text under the title (default 250 chars),
- button text (default 80 chars).
add_filter( 'czr_slide_title_length', 'my_slider_text_limits' ); add_filter( 'czr_slide_text_length', 'my_slider_text_limits' ); add_filter( 'czr_slide_button_length', 'my_slider_text_limits' ); function my_slider_text_limits() { switch ( current_filter() ) { case 'czr_slide_title_length': return 150; break; case 'czr_slide_text_length': return 500; break; case 'czr_slide_button_length': return 150; break; } }
Where to copy/paste this code? => in your functions.php file. We strongly recommend you create a child theme. Download a start-up child theme here.
Remember: you shouldn’t edit the theme’s functions.php.
13 thoughts on “Changing the default length / limits of the slider texts”
Hi Nicholas, does this code still work? I just tried it on the latest Customizir Pro version and it isn’t working
Hi Theme&Co team,
First, thanks a lot for your incredible theme!
Related to slider, Id like to delay the carousel-caption display.
I have tried with several code (even Js) with no success.
Pleae give me a help.
Thanks in advance.
Hi, how can I move the slider text box to the right side of the slider image? thanks.
Hi Maya,
You can play with the margin-left css property of the .carousel-caption selector to do that.
.carousel-caption {
margin-left: 11%; /* Original*/
margin-left: 30%;/* on the right*/
}
Hope this helps!
Hello!
Congratulations for the great work!
I’m trying to use the above snippet to my function.php of my child theme, but nothing happens to the slider.
Do I have to change something to the code, in order to make this work?
I need your help!
Thanks a lot!
Vasilis i have the same issue Did u find out anythink???
Unfortunately not!
The only thing I was able to do, was to insert less text in the box in order to have the result I wanted…!
Hi Vasilis, I just re-tested the snippet and it worked fine.
Did you make sure you pasted this code into functions.php ?
More about customizing the Customizr theme here.
Hi Nicolas. thanks so much for your great work on this theme. i got a question that how can make the picture in slider to exchange switch faster ? thanks
Hi David, you can set the duration of the animation in milliseconds when you customize your slider.
Does it answer your question?
Thanks
Hi @Nicolas, How to reduce the size of the rectangular background container that holds the slide title and description.??
how to write that code in function.php ?
Hi Cepep,
If you are new to Customizr (and WordPress), you might want to read this short guide on how to customize Customizr.
Hope this will help you!