Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • CP

    (@cparwebsites)

    Have you set your priority number higher than others loading in the footer?

    For example, here I used 999999…

    add_action( 'wp_enqueue_scripts', 'cpar_enqueue_later', 999999 );
    
    function cpar_enqueue_later() {
    
    wp_enqueue_script( 'myscript', get_template_directory_uri() . '/js/scripts.js', array( 'jquery' ), '', true );
    
    }
    • This reply was modified 2 years, 2 months ago by bcworkz. Reason: code format fixed
    CP

    (@cparwebsites)

    Personally, I have not played much with the wp_is_mobile() function; but what I can share (and hopefully help give you more info to investigate) is that I have seen issues with caching in the past. I have not used it on any production websites either.

    Also, I believe many have recommended not to use wp_is_mobile() in themes. (Not sure reasoning)

Viewing 2 replies - 1 through 2 (of 2 total)