WordPress.org

Ready to get started?Download WordPress

Forums

Installing Mootools within WordPress (5 posts)

  1. end
    Member
    Posted 6 years ago #

    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?

  2. Justin Tadlock
    Member
    Posted 6 years ago #

    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

  3. end
    Member
    Posted 6 years ago #

    Ahh, thank you! Got it up ;]

  4. aneesuddin
    Member
    Posted 5 years ago #

    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(); ?>
  5. llamaman
    Member
    Posted 5 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags