Articles of color picker

Color Picker Showing Twice When Widget Added to Sidebar

I’m trying to create a plugin that is basically just a WordPress widget. I’m having great difficulty getting the WordPress color picker to function correctly when my widget is first added to the sidebar. I’ve followed these instructions for integrating the picker. However, this causes two color pickers to show in the sidebar when the […]

How to customize a divs background dynamically using Advanced Custom Fields Plugin?

I’ve gotten as far as creating custom post types, custom fields and linking those to templates on this first time WordPress project i’m working on, but i seem to have run into a problem i’m not easily able to solve (and i run into these types of problems all the time naturally:). I have created […]

Cutomize Colors utility: How to add more configurable colors to a theme

Recent WordPress install, default theme. There are three colors which can be customized from the admin gui, but there are at least three other colors visible on the website which can’t be customized from there: Posts/pages background text colors in posts/pages text and background color in the search field I assume it is possible to […]

How to use rgba color from theme customizer color picker

I’m creating a wordpress theme and in that I am using the theme customizer to allow users to change the accent color of my theme. Now everything is working fine but few of my elements need to have the color in rgba() and not hexadecimal. I’ve searched around and found that there is no way […]

How to Use WordPress Color Picker API in Custom Post Type Metabox

I have a Custom Post Type called “Banner” which has a custom Meta box with two advanced fields “Title” (text Field) and “Color” (color Picker). Can you please let me know how to use the WP Color Picker API in field of color? here is my code for doing the job for the first field […]

Add colorpicker to featured image

I’m trying to add a colorpicker to the featured image meta-box. Here is some background: I use the featured image meta-box to place parallax background images. Because a user is allowed to place text over the image there is a (up until now) div that holds a white background. In the featured image box the […]

WordPress Iris Colour Picker adding iOS touch events

I’ve implemented an Iris Colour Picker into the front-end of my theme thanks to the help provided in this question and all works well on the desktop front. However, it seems as though when it comes to an iPad device the colour picker doesn’t work as expected. The mouse dragging event isn’t being recognised, however […]

Modify Javascript Configuration Options for Theme Customizer Colour Picker

I’ve started fully integrating the WordPress Theme Customisation API into my WordPress theme and it’s phenomenal. One issue I’ve encountered is that including the default colour picker is great, but I am trying to determine how to change the configuration options for the Iris colour picker being used. By default the colour picker in the […]

Adding WordPress colorpicker in widget settings

I want to add the WordPress default colorpicker in widget settings form. Here’s what I’m trying: In my functions.php, I have this: function widgets_scripts( $hook ) { if ( ‘widgets.php’ != $hook ) { return; } wp_enqueue_style( ‘wp-color-picker’ ); wp_enqueue_script( ‘wp-color-picker’ ); } add_action( ‘admin_enqueue_scripts’, ‘widgets_scripts’ ); In my widget file, I have this: <script […]

How to refresh Theme Customizer after change color inside wpColorPicker?

I develop my custom widget with setting where I can set up custom color for the widget. I use this code to initialize wpColorPicker instead of default text input in form() method of Widget class: jQuery(document).ready(function($){ $(‘#<?php echo $this->get_field_id( ‘bg_color_1′ ); ?>’).wpColorPicker(); }); All works great but if you are trying change the color in […]