Making a user listing

Support MB User Profile Making a user listingResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #37465
    YasmineYasmine
    Participant

    Hello,

    I am following these instructions: https://metabox.io/display-user-list-on-the-frontend-with-meta-box/

    I have completed step one and step two - but I am confused by step three. I copied and pasted that code and added to my php - but this alone does not work. So I think I am missing something.

    Should I be doing something to this code? I am unsure how it links to step one (my meta box form).

    I note the instruction "First, import the DataTables library prepared in step 1. Here, I didn’t download it but use it directly by CDN on jsDelivr." - but I think this is what I can't follow.

    Many thanks,
    yasmine

    #37466
    YasmineYasmine
    Participant

    Ok, worked it out the code was missing a speech mark

    function libs_import() {
               wp_enqueue_style( 'datatable-style', 'https://cdn.jsdelivr.net/npm/[email protected]/media/css/jquery.dataTables.min.css', '1.10.18', true );
               wp_enqueue_script( 'datatable-script', 'https://cdn.jsdelivr.net/npm/[email protected]/media/js/jquery.dataTables.min.js', array( 'jquery' ) );
    wp_enqueue_script('/*here*/ theme-script', get_template_directory_uri() . '/js/script.js' );
    } 
    add_action( 'wp_enqueue_scripts', 'libs_import' );
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.