Add color picker to wordpress admin metafield
Step 1 Enqueue the script & stylesheet for the WordPress color picker.
1 2 |
wp_enqueue_script('wp-color-picker'); wp_enqueue_style( 'wp-color-picker' ); |
Step 2 Add an id=”my-color-selection” or class=”my-color-selection” reference to the custom meta field you would like to use as the color picker. You can also add … Continued