You can’t pass this variable to the_title()
but you can simply wrap it in wp_trim_words function.
echo wp_trim_words( get_the_title(), $number_of_words );
You can’t pass this variable to the_title()
but you can simply wrap it in wp_trim_words function.
echo wp_trim_words( get_the_title(), $number_of_words );