Categories
CMS Mastering Development Wordpress

WordPress Admin-ajax 400 error

I have a problem with ajax request on admin-ajax.php. In the scenario, when the user selects a swiss billing payment method a hidden product should be added automatically and removed when some other payment method is added. I am not a pro in WP customization any help in this regard would be highly appreciated. I […]

Categories
CMS Mastering Development Wordpress

Js dom manipulation don’t work in shorcode

I am creating a little shortcode and for some reason JavaScript don’t work properly. I see that it starts good, but for some reason I can’t do any events or modify element css. I have tried event listiners, they don’t work at all. Than I tried onclick events. They do work, but again, I can’t […]

Categories
CMS Mastering Development Wordpress

Js dom manipulation don’t work in shorcode

I am creating a little shortcode and for some reason JavaScript don’t work properly. I see that it starts good, but for some reason I can’t do any events or modify element css. I have tried event listiners, they don’t work at all. Than I tried onclick events. They do work, but again, I can’t […]

Categories
CMS Mastering Development Wordpress

Js dom manipulation don’t work in shorcode

I am creating a little shortcode and for some reason JavaScript don’t work properly. I see that it starts good, but for some reason I can’t do any events or modify element css. I have tried event listiners, they don’t work at all. Than I tried onclick events. They do work, but again, I can’t […]

Categories
CMS Mastering Development Wordpress

Js dom manipulation don’t work in shorcode

I am creating a little shortcode and for some reason JavaScript don’t work properly. I see that it starts good, but for some reason I can’t do any events or modify element css. I have tried event listiners, they don’t work at all. Than I tried onclick events. They do work, but again, I can’t […]

Categories
CMS Mastering Development Wordpress

directory structure issue when calling a JS file and Ajax

I can not seem to make the call to the proper JS file location despite trying everything that I can think of. Below is the way that it should be from everything I know to find that "myjsfile.js" (name replaced for stackoverflow) function my_scripts() { wp_enqueue_script( ‘myscript’, get_theme_file_uri( ‘/assets/js/myjsfile.js’ ), array(‘jquery’), null, true ); wp_localize_script(‘myscript’, […]

Categories
CMS Mastering Development Wordpress

Iris color picker in custom theme option page not saving value

I have implimented the Iris color picker on my theme options page, but clicking ‘Save’ does not save the selected value, it just resets to blank (or the pre-set value). What am I missing here? functions.php: function accelerator_admin_scripts(){ wp_enqueue_script( ‘custom-js’, get_template_directory_uri() . ‘/js/custom.js’, array(‘jquery’), ‘1.0.0’, true ); wp_enqueue_style( ‘wp-color-picker’ ); wp_enqueue_script( ‘iris’, admin_url( ‘js/iris.min.js’ ), […]

Categories
CMS Mastering Development Wordpress

mailchimp integration on a custom footer

I want the user to be able to opt-in to a MailChimp newsletter within a custom footer, which one. of our clients has asked for. The client also uses MailChimp so we therefore cannot use anything like contactform-7 etc The two images below will help explain. The user will type in their email address and […]

Categories
CMS Mastering Development Wordpress

WordPress does not load jQuery

I’d like to use WordPress with Bootstrap but WordPress does not load jQuery properly so I get this error message: Uncaught TypeError: Bootstrap’s JavaScript requires jQuery. jQuery must be included before Bootstrap’s JavaScript. This is from my functions.php: function add_theme_scripts() { wp_enqueue_style(‘bootstrap’, ‘https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css’); wp_enqueue_style(‘style’, get_theme_file_path() . ‘/style.css’); wp_enqueue_script(‘jquery’); wp_enqueue_script(‘Popper’, ‘https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js’, array(‘jquery’), null, true); wp_enqueue_script(‘Bootstrap’, ‘https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js’, […]

Categories
Mastering Development

Override theme styles with plugin styles

I am writing a custom WordPress plugin, I am using the OceanWP Theme with Elementor, and am trying to enqueue/register Bootstrap 4.5 styles/scripts as well as my own custom styles/scripts. However, OceanWP’s styles are still taking precedence being used instead of my styles/scripts. Currently, I am trying to over ride the themes assets by upping […]