I've downloaded the JS To Title Case to apply to my site. It capitalizes a text string like a newspaper do. I'm calling it at the beginning of the PHP file:
<script src="../../js/to-title-case.js"></script>
And I want to add .toTitleCase() to this string, so it applies the JS to the title:
<?php echo get_inspiry_custom_excerpt( get_the_title(), 7 ); ?>
That PHP is part of:
<h4 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php echo get_inspiry_custom_excerpt( get_the_title(), 7 ); ?></a></h4>
However, wherever I add it, the page breaks and doesn't load.
How can I do this?