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
17 views

custom AJAX filtering logic and outputting results into an Elementor Loop Grid widget

basically as the title states, I am trying to output data into an Elementor Loop grid widget, using the infinite scroll pagination setting, however whenever I select an option that has only 1 post, ...
Bork's user avatar
  • 11
0 votes
0 answers
27 views

Upgraded to wordpress 6.5 and custom plugin no longer works

I wrote what is a relatively simple plugin that allows users on my woocommerce store to add a free sample to their basket, it's been working great until wordpress auto updated to 6.5, now when the ...
sico87's user avatar
  • 209
0 votes
0 answers
15 views

allow multi carousel in same page

I have this code for slider, i need help to edit it to allow multiple slider in same page. var all_divs = $('.px-carousel-container .px-carousel-item').length; var i = 0, n = 0; let ...
user3418508's user avatar
0 votes
1 answer
24 views

'Add Media' to post - filter images

Can anyone help me with this? ... I am trying to locate and understand the javascript and/or php/ajax code that filters the thumbnails that show in the interface when a user clicks "Add media&...
patrick_here's user avatar
1 vote
0 answers
58 views

slider i want move 4 images every button click

I have this code for slider button, i want move 4 images every button click. and make the button not active when all images slides if right or left. (sorry if my English not good) $(document).on('...
user3418508's user avatar
1 vote
1 answer
30 views

Metabox conditionals depending on post format and template in Gutenberg

In the classic editor, I used jQuery to display metaboxes depending on the current post-format or page template selected. If a user selected a different format or template, they would toggle depending ...
kath's user avatar
  • 601
0 votes
0 answers
17 views

Is wordpress core still jquery-dependant?

As per the title. I don't know where to find this information but, is wordpress Core still jquery dependant? I generally use my own custom themes, so I do not need jquery for the themes, and I can ...
Luca Reghellin's user avatar
0 votes
1 answer
26 views

Pull total post count for child category and parent if term ID

I have a mess of code that works, however I know its a mess and im sure there is a neater way of doing this. I am trying to get the child category to display under the parent category and for the post ...
Beep's user avatar
  • 29
2 votes
0 answers
26 views

Can't find elemnts on the DOM using Custom Control in Customizer API

I'am creating a Custom Control on Customizer API, I add Multiple Checkbox as my custom type. When I wanna add a live preview, the jQuery doesn't find the selector that I want. Here's functions.php ...
Miminou's user avatar
  • 21
1 vote
1 answer
27 views

Ajax response from Media Selection does not update ALL information more than once

I don't quite know how to explain what is going on, or how to title my post but I'm going to do my best. I'm making my first plugin for WordPress, which is very simple. Allow the user to select a ...
level42's user avatar
  • 113
1 vote
1 answer
13 views

Help with jquery/ajax requests

I have 2 forms on my page that I need to submit and stay on the same page. The first form works fine, but the second form will go to the admin-ajax.php page. First form/jQuery and Ajax request Like I ...
Darth Mikey D's user avatar
0 votes
0 answers
38 views

JQuery UI Autocomplete showing as bullets

The JQuery UI Demo page for autocomplete has a nice looking search box and drop down. When I implement it in my plugin, I end up with a bulleted list. How do I get my drop down of suggestions to look ...
Tuba Saif's user avatar
1 vote
0 answers
32 views

Why jquery arrray return 0 value

The array in this function return 0. I am unable to figure out what the problem is. function custom_woocommerce_auto_suggest() { $search_query = sanitize_text_field($_POST['search_query']); $...
Tuba Saif's user avatar
1 vote
1 answer
37 views

Translating the "Everything" filter menu in Quicksand jquery file

I have been using QuickSand Jquery to display my WordPress portfolio. Everything is working well. I just added the polylang plugin and would like to be able to translate the first item of the filter ...
made leod's user avatar
0 votes
1 answer
38 views

How to make WP Classic Editor required in jQuery

I have tried to validate the post content that must not be empty. Here are my codes: // HTML codes for Classic Editor in HTML mode: <textarea placeholder="Describe Ads here" ...
daro2013's user avatar
0 votes
0 answers
25 views

JQuery UI Autocomplete/Autosuggest Wordpress

I am creating custom search bar with category dropdown in my wordpress woocommerce site but auto-suggest not working showing response array 0 in console.What's wrong with the code? I am a beginner i ...
Tuba Saif's user avatar
0 votes
2 answers
62 views

jQuery - Make multiple field Required with warning at WP Admin backend

I would like to use jQuery to validate two fields on NEW/EDIT page of a Wordpress website in a way that When either of both fields are empty and Publish button is pressed, there is a warning: Please ...
daro2013's user avatar
0 votes
0 answers
17 views

Woocommerce attatch files and custom input meta to cart items and then to order

I have a product designer plugin to Print t-shirts and mugs. The plugin makes the Design in base64 but doesn't save the uploaded images to the media library. So I came up with a custom Ajax function ...
mysticalghoul's user avatar
0 votes
0 answers
29 views

Logout and redirect WordPress user id without he refresh the page

I m developing a functionality triggered on a button $('.disconnect-classroom-button') when clicked, I logout all members inside that group, and the logout is done successfully ( but the user has to ...
yasinedr's user avatar
0 votes
0 answers
26 views

Partial refresh in WordPress live preview

I have used the number input controller for the WordPress customization section. By entering the new number, the whole page is refreshed in the live preview, and the reason for this is because of the '...
Benjamin's user avatar
1 vote
0 answers
46 views

Custom plugin translation not working

I made a plugin that contains 2 custom gutenberg blocks created with react and jQuery (for some front-end stuff) and I'm having troubles translating them. There are no translation strings inside the ...
tsvetko.krastev's user avatar
0 votes
0 answers
29 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
13 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
38 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
57 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
22 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
1 vote
0 answers
166 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
42 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 ...
DiaJos's user avatar
  • 101
0 votes
0 answers
39 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
122 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
27 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
60 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
50 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
93 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
125 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
89 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
670 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
649 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
51 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
32 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
142 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
12 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
30 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
44 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
150 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
314 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
86 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
64 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
639 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
426 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

1
2 3 4 5
48