• Resolved seotaro

    (@seotaro)


    Hello. I want to load “script id=”jquery-core-js-extra” etc. that are loaded inline in Directorist externally.

    Is there no way to disable this inline loading function?

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Support Mahfuzul Alam

    (@mahfuz87)

    Hello

    Thank you for asking. If you want to load a script on a specific page, you need to enqueue this script like this –

    function load_external_script() {
    // Register and enqueue the external script
    if( is_page( 'add-listing' ) ): //use page id or page slug
    wp_enqueue_script(
    'custom-script', // Handle name
    get_template_directory_uri() . '/js/custom-script.js', // Path to script
    array(), // Dependencies (if any)
    '1.0', // Version
    true // Load in footer
    );
    endif;
    }
    add_action('wp_enqueue_scripts', 'load_external_script');

    If you want need further assistance, please contact to our support channel here – https://prnt.sc/cKSW-z2RTXrs. We will try to help.

    Kind Regards

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.