Support » Fixing WordPress » Installing Mootools within WordPress

  • Any tips on how to go about? I’m fairly new to the game and so far have failed. I install it perfectly on non-based wordpress page (playin html static page), yet I am unable to with wordpress?

    Any tips?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Justin Tadlock

    (@greenshady)

    WordPress God

    This is assuming you’ve added the file mootools.js to a folder named “js” within your theme.

    Before wp_head() in your theme’s header.php file, add this:

    wp_enqueue_script('mootools', get_bloginfo('template_directory') .'/js/mootools.js', false, '1.1.1');

    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    Ahh, thank you! Got it up ;]

    I’m having that problem right now.
    My mootools effect works without error on a static version and not at all on the wordpress version even though I have enqueued the scripts correctly and am not running any other scripts. It doesn’t even render any errors. i am at a loss!

    <?php wp_enqueue_script('mootools', get_bloginfo('template_directory') .'/js/mootools/mootools.js' , 'false' , '1.2.0'); ?>
    <?php wp_enqueue_script('filterExpand' , get_bloginfo('template_directory') .'/js/mootools/filterExpand.js' ,  array( 'mootools' ) , '1.2.0'); ?>
    <?php wp_head(); ?>

    I am developing a MooTools accordion WordPress theme, which can be downloaded here. Perhaps looking at how that theme is set up will help get you rolling.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Installing Mootools within WordPress’ is closed to new replies.