• Remove jQuery scripts from WPtouch functions

    I have WPtouch 4.3.18 plugin deployed on my wordpress site.

    In my WP Thema functions.php work fine this function:

    /** Remove jQuery scripts from begining */
    add_action(‘wp_enqueue_scripts’, ‘wbxp_script_remove_header’);
    function wbxp_script_remove_header() {
    wp_deregister_script( ‘jquery’ );
    }
    /** Load jQuery script at the end */
    add_action(‘genesis_after_footer’, ‘wbxp_script_add_body’);
    function wbxp_script_add_body() {
    wp_register_script( ‘jquery’, ‘https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js’, false, null);
    wp_enqueue_script( ‘jquery’);
    }

    But on mobile site of WPtouch don’t work and google speed page test show alert

    -includes/js/jquery/jquery.js?ver=1.12.4
    …s/jquery/jquery-migrate.min.js?ver=1.4.1

    only on mobile site.

    How can I fix the problem?

    There is a different function file in WPtouch?

Viewing 9 replies - 1 through 9 (of 9 total)
  • wpt bypasses your theme entirely; the solution is to put your functions.php into a plugin, which wpt will use.

    Thread Starter BakekaIncontritalia

    (@bakekaincontritalia)

    You can not put the theme function into a plugin….
    It’s a strange solution…..

    Under /wp-content/plugins/wptouch/themes/bauhaus
    there is a root-function.php file.

    Is it possibile edit file?

    Thread Starter BakekaIncontritalia

    (@bakekaincontritalia)

    You can not put the theme function into a plugin….
    It’s a strange solution…..

    Under /wp-content/plugins/wptouch/themes/bauhaus
    there is a root-function.php file.

    Is it possibile edit file?

    Thread Starter BakekaIncontritalia

    (@bakekaincontritalia)

    Remove jQuery scripts from WPtouch functions

    I have WPtouch 4.3.18 plugin deployed on my wordpress site.

    In my WP Thema functions.php work fine this function:

    /** Remove jQuery scripts from begining */
    add_action(‘wp_enqueue_scripts’, ‘wbxp_script_remove_header’);
    function wbxp_script_remove_header() {
    wp_deregister_script( ‘jquery’ );
    }
    /** Load jQuery script at the end */
    add_action(‘genesis_after_footer’, ‘wbxp_script_add_body’);
    function wbxp_script_add_body() {
    wp_register_script( ‘jquery’, ‘https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js’, false, null);
    wp_enqueue_script( ‘jquery’);
    }

    But on mobile site of WPtouch don’t work and google speed page test show alert

    -includes/js/jquery/jquery.js?ver=1.12.4
    …s/jquery/jquery-migrate.min.js?ver=1.4.1

    only on mobile site.

    How can I fix the problem?

    There is a different function file in WPtouch?

    Under /wp-content/plugins/wptouch/themes/bauhaus
    there is a root-function.php file.

    Is it possibile edit file?

    > You can not put the theme function into a plugin….

    why not? try it, u’ll like it;-)

    Thread Starter BakekaIncontritalia

    (@bakekaincontritalia)

    I can not create a plugin for a nonsense…

    I’ve seen that there is a different function.php file in the Basic Plugin theme.

    Can I change that?

    u could stick ur function into the wpt theme, but it’ll get overwritten at the next update…what’s nonsense is rejecting a solution to ur problem…

    Thread Starter BakekaIncontritalia

    (@bakekaincontritalia)

    “rejecting a solution” – This is not a solution to the problem.
    I must solve this jquery problem for the SEO site wordpress…..
    And for the SEO part, no additional plugins I can added.
    Without being aware of this, any wordpress site will be useless on line…

    Plugin Contributor WPtouch

    (@wptouch)

    Hi @bakekaincontritalia,

    As @airdrummer said, your best bet would be to add your function in a small plugin (it shouldn’t affect any other part of your site). Otherwise, if you add it to the functions.php file of the Bauhaus theme, it’ll be overwritten in an event of an update.

    In WPtouch Pro, you can use a child theme and add your function to its functions.php which does survive updates. This way you won’t need to add it in a plugin.

    Regards,

    Emilio Rivera,
    WPtouch Support

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove jQuery scripts from WPtouch functions’ is closed to new replies.