WordPress.org

Forums

Ajaxify WordPress Site(AWS)
[resolved] Move scripts to my main.js file (5 posts)

  1. errick87
    Member
    Posted 2 years ago #

    I would like to know how I can move the ajaxify scripts to my main javascript file where all my scrips are in.

    I've deregistered all the ajaxify scripts first with this code in my functions.php:

    wp_deregister_script('history-js');
    wp_register_script('history-js', (""), false, '');
    wp_deregister_script('jquery-scrollTo-js');
    wp_register_script('jquery-scrollTo-js', (""), false, '');
    wp_deregister_script('ajaxify-js');
    wp_register_script('ajaxify-js', (""), false, '');
    wp_deregister_script('jquery-form');
    wp_register_script('jquery-form', (""), false, '');

    Afther that i copyed all the scripts in the correct order to my main.js file, but the plugin doesn't work when done this.

    What did I do wrong?

    Many thanks in advance.

    Errick

    http://wordpress.org/extend/plugins/ajaxify-wordpress-site/

  2. manishkrag
    Member
    Plugin Author

    Posted 2 years ago #

    In plugin .php file I have used wp_localize_scripts function check.

  3. errick87
    Member
    Posted 2 years ago #

    Could you please provide an example as I have very little php knowledge?
    thank you.

  4. errick87
    Member
    Posted 2 years ago #

    Thank you, minified the scripts and suddenly worked as supposed. Gr Errick

  5. manishkrag
    Member
    Plugin Author

    Posted 2 years ago #

    Great :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Ajaxify WordPress Site(AWS)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic