The above code is working fine for me. I let it here, because someone might need it or have suggestions to do it in a better way. My problem was that the enqueue of js had loaded an old js file… .
Related Posts:
- WordPress Theme Preview Image
- Trigger Customizer saving process with Javascript only
- Changing the entire control choices using wp.customize with JavaScript
- How to Change CSS Variable value in Theme Customizer Live Preview
- WordPress Customizer Control with React
- How to hook CSS file according to theme selection in the customizer section
- Theme Customizer not loading JS for live preview
- Theme logo metadata into template file
- Image cropping isn’t working correctly when using Offload Media
- Theme customizer live preview JS- Trying to bind to an html image url without luck
- WP Customizer get control value on change
- Execute javscript when theme customizer loads (autosave issue)
- How do I remove a pre-existing customizer setting?
- pass object/JSON to wp_localize_script
- The the_post_thumbnail without srcset?
- Custom Image section in Customizer
- Any alternate TinyMCE4 themes / subthemes?
- Allow Shortcode in Theme Customizer
- Theme Customizer – Nested Sections?
- wp_get_attachment_image_attributes not working for me
- Specify image dimensions
- Is there a way to set the order of wp_footer hooked functions?
- Confused about image sizing business in WordPress
- Responsive class to all the images in the content
- How to remove menus section from WordPress theme customizer
- Checking if there is an Image inserted – if not don’t display anything
- How to get custom image size for image uploaded in Customizer
- Default header image does not display
- Responsive Images – Generating multiple images from Theme Customizer control upload?
- Modify the Additional CSS section (adding a disclaimer)
- Cannot get full thumbnail size using the_post_thumbnail
- wordpress custom theme import and export options for sample data [closed]
- What program can I use to preview my wordpress site?
- wp_get_attachment_image_src() width and height boolean
- WordPress not registering Theme Customization Section
- jQuery not available to other scripts
- get_option in header.php not returning value from customizer
- Internal error 500 accessing Theme > Customize
- Reasons why all thumbnail sizes aren’t working
- Default image size not working
- Customizer: save setting/control content to post/page
- Is accessing theme and using customizer GPL distribution?
- How to disable wordpress from overload my stylesheet styles with customizer styles
- How do I include pre-installed images in a theme?
- How to enqueue javascript for WP Customize options sidebar?
- Changing Header Image Every N Minutes/Seconds
- Do not display post images on front page
- Gallery thumbnails very small
- Change WordPress header color using customizer
- Default Text not showing from customizer
- Change Responsive Images Maximum Width of 1600px
- Is there any way to register custom background images like header images?
- How to transfer one domain to another domain without losing theme options (customizer)?
- How to show a manageable list of images on a post?
- Theme Customizer not displaying saved values in wp_head (CSS)
- Remove link on full-size images
- How to allow certain PHP functions when using sanitize_callback in the word press customizer
- How can I wrap all blog posts image with
- Customizer Color Control Not Working
- where is real values of variables?
- White screen when attaching css to function.php
- How to allow users to create their own website within my domain? [closed]
- Avada Child Theme Development
- Theme customizer – can’t add section/settings
- WordPress creating images if uploaded image is greater than 960px on one side?
- How to fix WordPress images not showing up in local hosted XAMPP server?
- Change Image Sizes for Mobile Theme
- How can I remove image taxonomy pages from my theme and from Google?
- ACF get_sub_field ALT TAG in the repeater doesn’t show
- WordPress Animation Adjustments
- theme directory fallback image outputs url and not the image
- How to copy page/post from one theme to another?
- How to change listing type permlink?
- In wordpress customizer div still showing even if I hid it with javascript
- Why does wp_customizer default values do not apply when theme is installed for the first time?
- Ajax Comment Upvotes – Votes don’t always register
- How Do I Create a WordPress Demo Site with Limited Admin Access
- Fatal error: Class WP_Customize_Image_Control not found
- What is difference between add_theme_support and Theme Customization API?
- change background image on scroll
- How do I remove header/page-title image in farvis theme? [closed]
- How to show Custom Field Value in Woocommerce Shop Page
- Duplicate child theme incl. design changes
- How to customize the colors within a stylesheet using a WordPress setting
- Does any JavaScript file load automatically for index.php file?
- Uncaught Reference error in Retina.js
- Images use & location, on new wordpress theme
- How to create multiple customizer controls in one control
- WordPress Customization API overwrite LESS variable
- Create image with imagepng() (fails at header)
- Custom image size doesn’t work
- Retina ready for uploaded images which are cropped
- Paginated WP_Query doesn’t return 404’s, even when posts don’t exist
- How to convert that page to a wordpress template? [closed]
- Add rel to all images in a post
- can’t add EVENT LISTENER to a element
- How to make a multilingual wordpress site to be translated one-to-one without much effort and without using translate?
- Custom Theme functions.php – Using add_settings_field and input type=”file” to set custom logo
- jQuery Snippet Not Working on WordPress Site [closed]
- I want to resize post featured image without cropping image. How?