WordPress.org

Support

Support » How-To and Troubleshooting » Custom meta box for custom post type admin UI

Custom meta box for custom post type admin UI

  • Hello,

    I made a [custom meta box] for a [custom post type].
    Inside this custom meta box I use jQuery UI datepicker on an input field.

    Everything works, but
    I was unable to make this work on WordPress’ local jQuery UI, I had had to use google apis jQuery UI through register and enqueue script.

    Now, however, it loads jquery UI and my jquery script to trigger the datepicker on every page of the wordpress admin UI.
    My question: how can I make it so these scripts only load on my custom post type admin UI?
    Is there something like

    if((is_admin)&&(is_mycustomposttype)){
        load scripts;
    }

    thnx

  • The topic ‘Custom meta box for custom post type admin UI’ is closed to new replies.
Skip to toolbar