Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

A client side scripting language useful for making interactive web sites

1
vote
0answers
16 views

Use second time navigation.js in underscores

I try to add a button dropdown in my theme underscores (without menu, simple div). I would like to use the script of navigation.js already present to notduplicate : ( function() { var container, ...
0
votes
0answers
11 views

WordPress TinyMCE Editor plugin not copying values from input boxes into shortcode. Displaying VALUE=“undefined” for each

I am building a custom plugin on WordPress to insert a [video_embed] shortcode with two attributes ("id" and "border"). The button for the TinyMCE editor that I have created is working but does not ...
4
votes
1answer
53 views

Extend core block in Gutenberg

for a project I have to extend the core block core/cover-image. For the first basic try I came up with the following code: PHP: add_action('enqueue_block_editor_assets', function() { ...
-1
votes
1answer
24 views

Woocommerce custom product with JS script, can't understand how it works

I'm learning WP, please be gentle as I'm a n00b! The website is xtraicehome.com. They sell synchetic ice for hockey training. The previous webmaster developed a Woocommerce product that executes a JS ...
0
votes
1answer
23 views

Why my javascript code not working for the dashboard of wordpress admin?

I am created a dashboard widgets using wp_add_dashboard_widgets() in admin area and created there a button ,i want when i click on button my script to be worked while that not working , all code of ...
0
votes
0answers
14 views

PayPal BuyNow submit/ click and formular submit email send - failing two events work on Internet Explorer 11 but it runs on the other browsers

It's about running two events simultaneously / one after another, following an action in Internet Explorer 11. Firefox Chrome, Opera, Android Browsers works, but not on Internet Explorer. Have a form ...
0
votes
0answers
18 views

URL Parameters Saved In Search

Can someone help me to figure out how, after a user has saved a search on my site and wishes to get notified if anything new matching that search criteria has been added, can I then re-run the saved ...
-2
votes
0answers
22 views

JS display woocommerce custom field if order total > $100 [on hold]

Im a newbie to js and cant figure this out. I'm trying to display a custom field if the order total is $100 or more. function panther_free_hat () { $order_id = $order->get_id(); $order_total = $...
0
votes
0answers
17 views

How to use JS inside of the (iframe) wp_editor function?

I'm using the wp_editor function to create a cool frontend editor. The problem is: WP generates an iframe where the editor's content is displayed - however I have a hard time to do anyting with JS ...
-1
votes
0answers
10 views

SimpleCartJS - How to get all items in cart and send via Contact form 7? [on hold]

I am trying to integrate SimpleCartJS with Wordpress to make a list of the posts that the user likes and send it via email through "contact form 7". The post are correctly added and empty, remove, ...
0
votes
0answers
22 views

Generate Token location based Wordpress Login and Register form [on hold]

How to create custom fields on login and registration form that save on database others field? For exemple, need to put one field called Latitude where user will put their latitude and this will be ...
-1
votes
0answers
16 views

Visually add spans [on hold]

I need your help. My project has a text animation, the words in which are divided into spans. And accordingly, each of these spans has the same animation, but different time of appearance. I need the ...
2
votes
1answer
22 views

Can't get JS code to work with shortcode

I am trying to create a plugin and I've got stuck. I am trying to register and enqueue a script from a shortcode: This is my shortcode: add_shortcode( 'gear-guide', 'gg_product_front_end' ); This ...
0
votes
0answers
18 views

Save Search Criteria notification

I am trying to simply figure out how, after a user has saved a search on my site and wishes to get notified if anything new matching that search criteria has been added, can I then re-run the saved ...
-1
votes
1answer
25 views

How to implement custom URL handler to access JS modal content? [closed]

I maintain a wordpress site that is javascript heavy and includes a lot of content in modals created with the the Tingle Modal library. The site is designed as a single-column site for the main page, ...
0
votes
1answer
26 views

Where to put coding a validation script for store? [duplicate]

I am pretty new using WordPress and was asked to validate the number of items in the cart for an eCommerce site that lets you "make a pack" in which you have several steps, step 1 is a page in which ...
0
votes
1answer
18 views

Help wiht adding fullcalendar.io to a WordPress page

I've been trying to add this calendar to my wordpress page. And I've followed the documentation, but it's still not showing up. This is what I've done. I first added this to my child theme functions ...
2
votes
1answer
13 views

Hide/show customizer controls based on other settings in Customizer

This may be an easy one for those who know jquery. So, I have two customizer controls. First one is lmscore_improved_summary which is a checkbox. And the second one is course_instructor_layout. So ...
0
votes
1answer
27 views

Using wp_localize_script to get data from cpt and pass it to maplace-js locations

I'm currently building an Dealerlocator with ACF and CPT. For the dealerlocator to shop the dealers on the map I want to use MAPlace-JS. This works fine when adding an array to the locations variable ...
0
votes
0answers
35 views

Load more on button click scroll (no plugin)

I have a custom taxonomy in WordPress called Case studies. Home.php is a page. Within home.php I have ran a loop to get all the case studies: <?php // only display 5 posts at first, then load 5 ...
0
votes
0answers
17 views

Save Search Notification

I am in the middle of creating a save search system on my website and I have the save search side of things working, but the problem is that I now need to run the saved searches every few hours or ...
0
votes
1answer
13 views

How to change the text of the “You are about to permanently delete these items…” alert message when deleting media from the media library?

This alert shows when you click Delete Permanently on a media (attachment) item. My Goal: I want to change the text of the alert if the current user has a certain custom meta value. Also, changing ...
1
vote
1answer
25 views

disable a wp javascript on live website, but not on wp-admin page

I have a wp javascript, wp-embed.min.js, disabled on my WordPress theme by adding this sample code to my theme's function.php file: add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 ); ...
1
vote
0answers
20 views

Save Search System

I am trying to create a save search notification system whereby a user can search certain parameters on my site and save the search query like Ebay does or other classified ad websites do. I ...
1
vote
0answers
27 views

Why won't my scripts load?

I am having trouble loading scripts in functions.php I've done this before so I'm sure I'm overlooking something but as far as I can tell it is correct and I have tried copying and pasting from other ...
1
vote
2answers
41 views

How to call a PHP function from Javascript in Wordpress

I have a very simple plugin with a javascript file and a PHP file. I want to call the PHP file from my javascript code and get the output. The javascript functions is something like the following: ...
0
votes
1answer
26 views

Pass product object to javscript

I am getting a product object in php and I want to pass it to JavaScript. This is the php code: <?php // Add custom Theme Functions here // //gg stands for Gear Guide function ...
2
votes
1answer
26 views

How to hook CSS file according to theme selection in the customizer section

I have added a new area in the Customizer section which allows a user to choose whichever theme colors they want: But I don't know how to activate/add CSS files according to the selection. i.e. add ...
1
vote
0answers
34 views

Popup box when Clicking on Insert into post button in wordpress

I need to show a alert popup on clicking Insert into Post button in Media Library of WordPress, if the selected Image is less than some width and height in Library. Where can I find the onClick event ...
0
votes
0answers
15 views

JQVMAP not working after proper wp_enqueue_script usage [on hold]

So I worked at this for awhile and I found other people having problems with JQVMap. I'm not sure if there is some JQuery conflict, I did test registering a newer JQuery, but I'm not interested in ...
1
vote
0answers
13 views

Trying to create a private area custom for each user where they upload images to a server [closed]

I have quite a bit of experience writing Python, but I'm trying to create a website for the first time using wordpress. I really like the user area that this site offers: https://www.ponoko.com/ and ...
0
votes
0answers
13 views

Integrating D3 Graphics in WordPress

I am looking to get a website up and running fairly quickly. I was planning on using WordPress and one of their pre-made themes. However, once I design the site, I was hoping to be able to integrate ...
1
vote
1answer
11 views

Ajax Modal Flickers When Opened Multiple Times

on my Wordpress site I add a button that when clicked calls a modal to open via ajax. When I click the button once on a fresh reload of the page it seems to work fine without any hiccups. If I close ...
-1
votes
0answers
10 views

add key to array items using javascript es6 map

I have an array that looks like this: Array[8] 0: {…} content:"Service stations" group:"1" order:"0" and I want to add a key to each element using ES6 map function but I cannot work out the syntax? ...
1
vote
1answer
15 views

Screen Resolution Detect

how can i put option in WordPress theme if someone visit my site then header or sidebar showing they are Screen Resolution auto detect how can i add screen link link here
0
votes
1answer
23 views

Proper way of minifiying java script files in wordpress theme

How can make sure that java script minification in wordpress does not create issues once it is done in theme development point of view? Does wp-enqueque script order matter in minification process? ...
0
votes
1answer
36 views

Conditional fields in contact form 7 not working

In my contact form I need a drop down for order quantities. On selection of "other", I want to display a number field for input. Below is my code but it's not working. Can anyone help? Thanks in ...
0
votes
0answers
25 views

REST API: Display Category names in JSON?

Using the Wordpress REST API, I retrieve all my posts into a Angular 6 service. The category field in the JSON displays the ID of the category as an array of numbers. "category": [ 6 ], Is there a ...
0
votes
0answers
10 views

How can I add padding-left to text lines in CodeMirror editor?

I want to use CodeMirror editor in my custom WordPress plugin. But the text that I've written in lines need some padding-left value. I can't modify the styles by CSS. And here are my js codes: <...
1
vote
1answer
122 views

dynamic dependent select dropdown

I have a dynamic dependent select dropdown system that selects vehicle makes and models from a database which works fine but I would like to convert it to use and select parent and child categories ...
1
vote
1answer
26 views

Contact Form 7 - Give each checkbox a class?

I'm using Contact Form 7 and have a group of checkboxes in my form. I want to give each checkbox a class. CF7 lets us add a class, but this only applies to the parent object. I want my custom class on ...
0
votes
1answer
36 views

<button> element not working in Safari [closed]

The Show Me button on my homepage does not work in Safari (on both iPhone and mac). Can someone take a look and give me some ideas to try. The homepage is this.
1
vote
0answers
18 views

How to embed JS data viz in a simple Wordpress website

I am just starting out with web development and JS. Is it possible to embed a data visualization created with Arbor.js in a static website created with such quick deployment tools as Jekyll or Hugo? ...
1
vote
0answers
47 views

Refresh Markercluster after ajax call

I have an ajax function that queries posts based on users by a certain role which is fine and works but the problem is that I am trying to refresh the markers on Google Maps after the ajax is complete ...
0
votes
1answer
15 views

Cannot use characters '<' or '>' in jQuery script in WordPress

While running my jquery script in wordpress I ran across this weird error. That does not allow me to use characters '<' or '>' in my script, any surrounding text just disappears during runtime. ...
1
vote
0answers
19 views

Include custom JS without child theme

Is there a way to include custom JavaScript on a website, without using a child theme? I am currently working on a customers website. Unfortunately he somehow managed to make it kind of impossible to ...
0
votes
1answer
31 views

Preventing double loading JS scripts (like React) when developing for Gutenberg

Gutenberg is mostly made in JS, so I'm using create-guten-block to create some custom blocks. If multiple plugins use this to create blocks, is it a problem that these scripts get compiled and loaded ...
1
vote
2answers
35 views

WP Admin missing icons, numerous JavaScript errors, but only when SCRIPT_DEBUG is false

I have access to a single Linux/Apache server where I'm trying to deploy WordPress. For purposes of this error, I've tested it with the default twentyseventeen theme and all plugins disabled. When I ...
0
votes
0answers
22 views

Spans in gutenberg

How can I make a user automatically add spans in the Gutenberg editor? I want to create a "feedback" block - an example from the link: http://bogdans-ultra-awesome-project-10773e.webflow.io But the ...
0
votes
1answer
25 views

Why is wp api returning old acf values?

I have a list of custom post types (Events) with ACF fields for start and end dates that I'm getting using WP-API. I'm using the fetch api to make the calls. I have the acf-to-rest-api plugin ...