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 Add images uploaded in the post to a default custom field
- attachment.php code or tutorial
- Change “Thumbnail”, “Medium” and “Large” image sizes using functions.php?
- Theme-wide custom post template
- image url relative path not working in css file
- Default image size not working
- Edit footer via customizer
- How to add material design css in wordpress and woocommerce
- How do i make a custom section’s setting display the default value in Customizer?
- How to add styles set by user in the customizer
- Use second time navigation.js in underscores [closed]
- Disabling Customizer Selective Refresh shortcut icons for selected controls
- JavaScript stops working on selectively refreshed sections one inside the other
- Folder name for a pro version of a WordPress.org theme?
- Display theme layouts [closed]
- “Add A Widget” button in the Customizer
- WordPress Media Uploader in page template (On Front-end)
- Can I add multiple arrays within add_theme_support( ‘colors’ )?
- Theme Javascript.php Overwritten Nightly [closed]
- Customizer: save setting/control content to post/page
- Q: How to pull data from custom table to populate zustomizer setting/control select options
- How to: JQuery multiple wordpress media uploader buttons in the same options page?
- Using WordPress’ Theme Customizer to select page templates that update layout in the preview
- Dynamically generated wordpress customizer options?
- Responsive Images – crop don’t seem to work
- Is accessing theme and using customizer GPL distribution?
- How to get javascript slider to work! [closed]
- How to disable wordpress from overload my stylesheet styles with customizer styles
- How do I include pre-installed images in a theme?
- The ‘default’ attribute from $wp_customize->add_setting() method not in db?
- Override customizer values on a per-menu base
- How to modify default controls in WordPress theme customizer
- How to enqueue javascript for WP Customize options sidebar?
- Is it possible to visually group items on the theme customizer?
- Inserting images in multiple posts native gallery
- Can I get the ID of an inserted / linked image?
- Add attachment for all images in post
- Changing Header Image Every N Minutes/Seconds
- Do not display post images on front page
- What is the meaning of WordPress’s recommended css classes and where are they applied?
- Redirect to another page using contact form 7? [closed]
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Gallery thumbnails very small
- My jQuery is enqueued properly. So why isn’t it working?
- Enqueued JavaScript is not working
- Change WordPress header color using customizer
- Default Text not showing from customizer
- Custom image size vs CSS sizing
- Getting Different Size Of Attachment Images
- In creating a theme, how can i allow a user to change an image outside post/page content?
- 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?
- How To Pick Custom Size Of Uploaded Image In Theme Via the_post_thumbnail();?
- Why in the static pages of my theme are showing these information?
- How to register and enqueue JavaScript files without breaking plugin dependencies?
- Change image size depending on page
- How to disable thumbnail filter for a specific template part or image size?
- wp_enqueue_script not working?
- Theme Customizer not displaying saved values in wp_head (CSS)
- How to obfuscate theme directory URLs
- Is there a WordPress boolean for “theme_customizer_active()”?
- Are seven additional image sizes are too many?
- Remove link on full-size images
- Can I make a Customizer dropdown-pages list include private pages?
- 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
- how to retrieve the image title for image Post Format
- 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]
- WordPress theme resource won’t load over VPN
- Doing context-aware previews in the WordPress Customizer
- How to set Post meta-box defaults based on the choices made by user in Customizer?
- pass wordpress template directory into ajax url call
- theme-independent CSS/JS files
- Alignment Problem [closed]
- Avada Child Theme Development
- Questions from a new WP Dev [closed]
- Adding a new setting using Kirki or WP customizer with an if statement
- Theme customizer – can’t add section/settings
- Create something that can be added or removed in Customizer
- Customizer: get_preview_url() inside customize_save_after hook
- Javascript development in Custom Themes
- WP Customazation API doesn’t save the default Value
- add shortcode support in customizer