Thread Starter
KySo
(@kyso)
For example in the slider I want to show the text of a testimonial with name and location of the author.
How can I set the name and the location below (new paragraph) of the testimonial?
If you want to add a little html at the start or your text add this <p> that will start a new paragraph. At the end of the paragraph add this</p>
That will End the paragraph. Dont forget the slash in the end of paragraph.
Thread Starter
KySo
(@kyso)
Thanks for your answer but the Customizr Theme offers here only a visual editor and so it doesn’t work with <p></p>.
Any other idea?
You can try with this little trick.
In the slide description you can use “[p]” and “[/p]” instead of “<p>” and “</p>”, which will not be escaped.
Then add this in your child theme functions.php .
add_filter('tc_slider_display', 'add_description_p');
function add_description_p($html){
return str_replace(array('[p]','[/p]'), array('<p>','</p>'), $html);
}
`Did you go into into the theme editor and try adding the code in the editor.
Barry, customizr escapes html for that field.
@kyso
Anyway a better way to do that would be to use not a <p> neither a [p] (’cause the description is rendered in a <p>, and you can’t have nested <p>), but a span.
In your description use something like
Text[span=p]first p[/span][span=p]second p[/span]
In your child theme functions.php use this snippet instead of the previous one I gave you:
add_filter('tc_slider_display','add_description_p');
function add_description_p($html){
echo preg_replace(array('|\[span=(.*?)\]|','|\[/span\]|'),array('<span class="$1">','</span>'),$html);
}
Then in your child theme style.css or your custom css you have just to write this:
.lead span.p {
display: block;
}
That’s it.