Questions tagged [jquery]

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is included with WordPress, and available to both themes and plugin developers.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

How to show custom fields in modal in category page

The code below shows the title and content in the modal popup in category.php file. The full tutorial can be seen here although not important: https://artisansweb.net/load-dynamic-content-on-bootstrap-...
user3362364's user avatar
0 votes
0 answers
11 views

Help with uploading file with AJAX and PHP

I have a form that I am trying to upload a file to the server with and then save the info to the database. Saving the info to the database works fine except for the file information and the file doesn'...
Darth Mikey D's user avatar
0 votes
0 answers
22 views

Help with creating commenting system using PHP, jQuery and AJAX

I am working on creating a comment system for an events plugin I am working on. I've got the main comments working fine with them saving to the database and displaying on the page. What I need help ...
Darth Mikey D's user avatar
0 votes
3 answers
40 views

Help with AJAX request

I am creating an events plugin with a commenting section for each event. I am able to save each comment, but the problem I'm having now is that I am taken to admin-ajax.php which is blank. When the ...
Darth Mikey D's user avatar
0 votes
1 answer
16 views

Update shortcode values using ajax call

I'm having a problem with a calendar, I've made a shortcode which returns events links in a grid that shows the current month view. I set $month_index in order to navigate through months (default is 0 ...
Enrico's user avatar
  • 11
0 votes
0 answers
30 views

How to add new ACF repeater row after removing all rows using jQuery/Javascript

I am creating a custom ACF Field within a page edit screen which I have added a div container, outside the container is 3 buttons. Add text block, add image and save. I also have a repeater field (I ...
DigitalDesigner's user avatar
0 votes
0 answers
24 views

How to make Contact Form 7 work when injected via AJAX in WordPress?

I am working on a WordPress project where I need to use Contact Form 7 as part of an AJAX response to check if certain data is available. However, I am facing an issue where the form is not working as ...
CodingWeb's user avatar
  • 101
0 votes
0 answers
26 views

How to add icon to WooCommerce add to cart button

in woocommerce, I want to add an icon from the iconify library to the add to cart button of my site I made some attempts, but I did not get the desired result. I used WooCommerce hooks, but this icon ...
MahmoodZamaniNemati's user avatar
1 vote
1 answer
99 views

add_post_meta when jQuery button is clicked

So I have this code that's using jQuery on click. It fills the heart: https://jsfiddle.net/69ww31n3/ Here's where I'm struggling, I want when the heart is clicked it would add_post_meta key 'heart' ...
RaymondM's user avatar
0 votes
0 answers
23 views

Pass form fields values from JS to PHP

I have a custom Gutenberg block plugin containing a custom HTML form. In my block I have a init.php file, where I'm enqueueing a Google Maps API library. All the frontend of the map is in jQuery. ...
TsvetkoKrastev's user avatar
0 votes
0 answers
40 views

Gravity Forms Pre Submission Check

I have only one field with an email address. If the field is empty, i don't want the form to be submitted at all, but just focus on the field. I have tried many variations but no matter what i do, the ...
JoaMika's user avatar
  • 668
0 votes
0 answers
38 views

How do I change a variable in a Wordpress query with a select menu dropdown option and reload the WP query

I'm implementing a drop down menu that is populated with brand names of products. It's populated dynamically with the title(s) from a wordpress custom post type (axiss-brand). When the user selects ...
KKA's user avatar
  • 1
0 votes
1 answer
34 views

Wordpress Media Uploader not displaying image that has just been uploaded

I am trying to implement a custom WP Media uploader within a plugin. I want multiple images to be uploaded also. I have the following javascript to open the media uploader. The modal opens fine and ...
JadeTech's user avatar
0 votes
0 answers
65 views

ajax select parent show child in another select and show posts in another select-ajax filter search

I'm on wordpress and I created a search filter shortcode which user can select province and show towns on another html select base on province and when user select town, in another html select it must ...
Alipvd's user avatar
  • 3
0 votes
1 answer
47 views

How do I remove/hide embed excerpts from posts

How can I remove post excerpt from internal links that are embed as posts to custom WordPress page. https://prnt.sc/6e07tjSht5i7 I cant do it with classic CSS styling , I guess due to the iframe/embed ...
Acidburns's user avatar
0 votes
0 answers
296 views

Custom jQuery code in Elementor page is not working on Mac os. On Windows browser work fine

Custom jQuery code in Elementor page is not working on Mac os. On Windows browser work fine. I make small jQuery script for tabs and put in Elementor page. On all Windows browsers is working fine, but ...
Pinky08's user avatar
0 votes
1 answer
135 views

Injecting CSS into Iframe

I have added an iframe to my website. Within the I-Frame is an area which is not required and I would like to hide. I have tried to inject CSS into the i-frame using Functions.php add_action( '...
PaulMcF87's user avatar
  • 131
0 votes
0 answers
47 views

I'm trying to register with AJAX

I have tried this add_action( 'wp_ajax_custome_ajax_email_check', 'custome_ajax_email_check' ); add_action('wp_ajax_nopriv_custome_ajax_email_check', 'custome_ajax_email_check'); function ...
Chandan Sayed's user avatar
0 votes
0 answers
14 views

Using keyboard to trigger modal in addition to mouse click

hoping someone could help out with this. would like to trigger the Frames modal component not only by mouse click but also keyboard key, such as '/'. Mousetrap.bind("/", function () { jQuery(...
vulgarbulgar's user avatar
0 votes
1 answer
112 views

How to change the text of Publish Button

I am trying to change the text of the publish button to save. I could change the text. BUT, When I click Status Edit button and OK button, it change "Publish". How can I fix this? This is ...
amy's user avatar
  • 3
0 votes
0 answers
11 views

Wordpress Includes mejs 404 error

I have an issue with NewRelic reporting a number of 404 errors which all stem from the WP includes mejs Example of the 404 error site.com/mejs.hebrew & site.com/mejs.dutch Has this occurred for ...
WilsonP's user avatar
0 votes
1 answer
26 views

Enqueued jQuery not working

I am trying to change a label on the add new page for a custom post type, but I am having trouble getting any jQuery to operate. In functions.php, I am enqueueing my script file, after first verifying ...
Hm Cody's user avatar
0 votes
0 answers
43 views

get_post_meta returns on side but it doesn't return on bottom of admin page

I have added a custom image upload option in custom CPT page and here is the screenshot - The image is showing well in side bar of admin page after updating a post, screenshot- But when I add that ...
Md maniruzzaman Moon's user avatar
0 votes
0 answers
131 views

Unable to correctly include jQuery in a legacy Wordpress application with multisites

Our legacy multi-site Wordpress application with Wordpress version 6.2 and jQuery version 3.6.4 was working fine so far. We did a PHP upgrade, from version 7.2 to 7.4. Since then, jQuery is not ...
Sandeepan Nath's user avatar
1 vote
2 answers
191 views

CF7 Populate Text Field Based On Checkbox Checked

I need to be be able to auto populate a text field with "one-hidden" when a customer checks a checkbox but so far examples I've found online do not seem to work or im putting them in the ...
Tom Kidd's user avatar
0 votes
0 answers
74 views

Access jQuery tabs from primary menu while adding/removing class on tab container elements (accessing diff. tabs/tab content via primary menu items)

I’m working on a WP site (currently localhost only) with a regular WP horizontal primary menu. On the front page further down I have a set of 8 vertical tabs (based on jQuery tabs) which are toggled ...
josch's user avatar
  • 1
0 votes
0 answers
55 views

How to update my jquery/PHP function to add/remove user as favorites in (WordPress) users list

I have a WordPress website in which I list down all the users (based on MemberPress subscription), and users can save other users as favorites. The function works well when saving a user as favorite, ...
Bart's user avatar
  • 1
0 votes
2 answers
340 views

AJAX call not initializing for non-admins in WordPress

I developed my ajax functionality while using a WordPress admin account and everything worked correctly. Testing as a user, however, I cannot get the functionality to call - and pressing the "...
jgdhnds's user avatar
0 votes
1 answer
237 views

How to access Elementor-navigation-elements via jQuery

I am currently working on a custom WordPress-Plugin in which I need to extend the menu of the Elementor-plugin (the menu on the left when you edit a page or post via Elementor). For some reason I am ...
Dennis's user avatar
  • 103
0 votes
1 answer
117 views

Insert meta-description into Yoast-SEO input-field via JavaScript

we're currently working on an extension for the Yoast-SEO WordPress-Plugin. One of the features of this extension requires the meta-description within the Yoast-SEO-area to be replaced via JavaScript ...
Dennis's user avatar
  • 103
0 votes
0 answers
17 views

I have made this form and i want to show this form in a popup by clicking on the filters button which is in a shortcode html in function.php file

this is the button which Filter Advance Filters x Search by Workout Name Workout ...
AnAs ShAh's user avatar
0 votes
0 answers
36 views

How to add an active state class to my info box

I built my wordpress site with wp bakery page builder. I created a menu of info boxes that have an element ID that it links to (links to an html block within the page). I want to style the active ...
Dora's user avatar
  • 3
0 votes
0 answers
100 views

How do I fix this "Uncaught ReferenceError: woodmartThemeModule is not defined"?

The issues in console: at headerBuilder.min.js?ver=7.1.4:1:14 at headerBuilder.min.js?ver=7.1.4:1:2394 (anonymous) @ headerBuilder.min.js?ver=7.1.4:1 (anonymous) @ ...
darylvickerman's user avatar
0 votes
0 answers
55 views

How to add input file plain text and submit to publish?

Update: I got it to update the database and allow the submit but it only saves the local directory path and file name, but it should be saving the file contents, not the path and file name. It is ...
Angel Hess's user avatar
0 votes
0 answers
75 views

generate excerpt from the part of big text dump that contains keyword

I'm working on an older site with a million plugins that just can't handle SearchWP and trying to mimic some of that plugins functionality. Things that ARE working: my search includes an ACF textarea ...
Matthew Wright's user avatar
0 votes
1 answer
39 views

Making the Google Maps API non readable

Our former developers created this code below. However, when it renders on our site, it displays the API key. Is there a better way to hide the API key while still enlisting the script to be executed? ...
HomeWell Web's user avatar
0 votes
0 answers
24 views

iOS and ajaxComplete

EDIT: Hmm, it seems to be working now. Maybe some kind of caching issue. Can anyone offer any help? The following code works fine, except on iOS; $( document ).ajaxComplete(function() { $("#...
BadScooter1980's user avatar
0 votes
1 answer
549 views

slider wont load unless you scrolldown on mobile, slick.js carousel

I use slick.js for my carousel. Everything is working fine on desktop but in my mobile I have this weird problem where the slider doesn't load correctly until I scrolldown. Have anyone here also ...
luna moonfang's user avatar
0 votes
0 answers
51 views

Can't seem to check off a category checkbox with jquery?

I've got the following simple jquery test script to test if I can check off a category box in the right sidebar when creating a new post: jQuery(document).ready(function($) { console.log('js file ...
StevieD's user avatar
  • 211
0 votes
1 answer
696 views

Upload multiple files via ajax from an HTML file input

I'm trying to upload files from a multiple file upload HTML input via ajax on a WordPress site but I keep getting a 400 error and I'm not sure why. My code is based on this tutorial. jQuery: $(...
AJT's user avatar
  • 187
1 vote
0 answers
73 views

Impossible to update jQuery version from 3.1.0

PageSpeed Insights is complaining about me using jQuery version 3.1.0 because of security risks. I've been trying to update my jQuery version with two plugins: jQuery Updater jQuery Version Control ...
Fernando Redondo's user avatar
3 votes
1 answer
37 views

Execute javscript when theme customizer loads (autosave issue)

I have a theme that is having an issue when there are unsaved theme changes, then the user restores an autosave. My theme has some jquery that watches for a font to be changed, then updates a second ...
JWright's user avatar
  • 33
1 vote
0 answers
325 views

WordPress Ajax search filter on dropdown select

I am trying to create search filter on click dropdown selection, but still not achieved, here is my code. Here is form code, which contains three different dropdwon <form id="filter-form"&...
Parth Ranjan's user avatar
0 votes
0 answers
109 views

AJAX search function resets wp_query vars

I have a custom post type called event. On the archive page I implemented a simple search which returns a selection of posts. Before submitting the search form I'm seeing the proper query vars for the ...
Hewe's user avatar
  • 75
0 votes
0 answers
114 views

WP Customizer get control value on change

I've written a function for my WP theme based off of this question:Changing the entire control choices using wp.customize with JavaScript My code is as follows: ( function( wp, $ ) { wp.customize....
JWright's user avatar
  • 33
1 vote
1 answer
289 views

getJSON response to PHP

I am working on a project where i must call a 3rd party API from client-side then process the response in PHP before displaying it in on the front end. So i planned it in my head like this: use ...
k33n's user avatar
  • 31
0 votes
1 answer
425 views

Bad Request 400... jQuery ajax post of json data to wordpress admin-ajax.php

I've tried and tried and tried, I've searched and searched... I can't figure out why this isn't working. One huge problem is I can't seem to figure out how to get any good debug info about why this is ...
Dustin's user avatar
  • 1
1 vote
1 answer
212 views

ajax problems on loading page [closed]

I wrote a code that when a user click on a button. contents will be displayed via ajax in wordpress. I used wp_ajax_{action} and wp_ajax_nopriv_{action}. when I load the page ajax run without any ...
wprah's user avatar
  • 46
0 votes
2 answers
2k views

Elementor form - checkboxes validation

I am building a form with elementor pro. I noticed that the checkbox fields (not the acceptance) don't have a required setting/option, but I need to validate a specific groups of checkboxes, so I ...
vsapountzis's user avatar
2 votes
1 answer
850 views

WordPress Ajax send response on every iteration of a loop

I am trying to get an ajax request to update the response as it goes through a loop, similar to a progress bar. A bit of background on this snippet. Here is the JS Ajax request: // ------------...
sallycakes's user avatar

1
2 3 4 5
48