Support » Themes and Templates » Setting up FlowType.JS

  • Luke


    I need some help getting FlowType working in a theme.

    I downloaded the FlowType.JS file from Github and put it in my theme directory.

    I used the following code in functions.php to enqueue it (with jQuery dependency).

    function custom_scripts() {
            get_stylesheet_directory_uri() . '/typeflow.js',
            array( 'jquery' )
    add_action( 'wp_enqueue_scripts', 'custom_scripts' );

    Then I added the following script just before the closing </body> tag in my theme.


    I am testing it on an iPhone by rotating the phone from portrait to landscape. None of the text enlarges and shrinks. Can anyone help me out with that?


Viewing 3 replies - 1 through 3 (of 3 total)
  • I think you need to wrap the $(‘body’).flowtype(); code in:

    jQuery(document).ready(function($) {
    // Inside of this function, $() will work as an alias for jQuery()
    // and other libraries also using $ will not be accessible under this shortcut


    Both of these should work:



    I’m sure that he’s caught this by now but someone else may try it and fail…

    get_stylesheet_directory_uri() . ‘/typeflow.js’,

    Instead of “typeflow” it should be “flowtype”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Setting up FlowType.JS’ is closed to new replies.