CrazyLab

≡
⟱

CrazyLab

Today is not a preview of tomorrow, today is today !!!

Ensure that ajaxurl will be available on front-end

Published 09/09/2018 at 12:27 pm

This is how I make sure that ajaxurl will be available at frontend:

wp_add_inline_script('anything','var ajaxurl="'.addslashes(admin_url('admin-ajax.php')).'";');

Leave a comment below:

Name:
Site:
E-mail: