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
0answers
15 views

Wordpress and Modal Popup - how to make the already loaded javascript assets available in modal?

I am having a very difficult time getting a modal popup to behave as needed. I have a modal for a forum topic page and want to handle the form submit via ajax, using this great little plugin: https://...
0
votes
0answers
10 views

login form should redirect to register page for in 1st login next time it should redirected to home page

I'm new to WP I need your help in redirect the user only for 1st time logging, in my landing page, 1 created a login form if the user logged for 1st time means it should redirect to register page and ...
0
votes
0answers
18 views

Query String Filtering API

Currently, I'm working on a search application that searches/filters stores(Custom Post Type) based on the store-feature(Custom Taxamonies) IDs. When I use the WordPress Fetch API, I can get the full ...
0
votes
1answer
41 views

Uncaught TypeError: jQuery(...).slider is not a function

i am trying to use the jQuery-ui function: slider(): here's my code that i wrote inside the jQuery(document).ready...: jQuery("#slider-wp").slider() and in my functions.php file i wrote ...
0
votes
0answers
24 views

Display custom field value in woocommerce variable product via jQurey

I try to display the custom value fields that each variation has. I use this code to display variation id and variation description: add_action( 'woocommerce_before_single_variation', '...
0
votes
0answers
14 views

How do I call a value from the datase using ajax

I need to call and display a value for the users using Ajax but I'm not sure how to do it. Currently the plugin I use call it using a query that means the users must refresh thier browser every few ...
0
votes
0answers
22 views

Search live Ajax

It is necessary to reach the search entries instantly, but why can I cause such an error? This error : POST https://localhost/theme/wp-admin/admin-ajax.php 500 (Internal Server Error) Following my ...
0
votes
1answer
39 views

How to test nonce with AJAX - Plugin development

I built a plugin, but now on end, I am not sure whether my nonce integrated correctly, and I'm not sure how to test them. Can anyone help me test it or let me know if the nonce is integrated correctly?...
0
votes
2answers
70 views

Wordpress admin-ajax.php 400 bad request

I try tu run wp form with ajax but console return Wordpress admin-ajax.php 400 bad request. jQuery(function ($) { $(document).ready(function () { jQuery('#...
0
votes
0answers
23 views

Fire action after enqueue script

I have a color switcher but its css files load before default css files.so, it doesn't work good.I want to fire it after enqueue script.after all css and js files on the website, I want to load my ...
0
votes
1answer
22 views

Remove Author Links

I'm trying to remove the author pages as well as the links to the author pages on my wordpress website powered by Divi. First, I disabled author archives and pages with the Yoast plugin. Then, I used ...
0
votes
0answers
28 views

javascript onClick update user_meta from jquery.ajax

The idea is to add two values and the total of the sum save it or update it in user_meta with jquery.ajax. This is the code, but it gives me an error in the console Uncaught ReferenceError: 'total' is ...
0
votes
0answers
13 views

Menu item that hides when you click the previous submenu

I have a problem on the menu of this site: http://gabriellevinson.fr/. Notably with the project submenu and the contact link. Indeed, when I click on the arrow next to the project, the contact link ...
0
votes
0answers
46 views

How to check a variable Changes

I have a variable $curr_price. Every time some user updates the variable, I want to show a message to the other users. Should I use a jQuery script something like this: $("curr_price")....
0
votes
0answers
14 views

Submitting form from input[type=file] dialog box

I am attempting to trigger a form submit from an input [type=file] dialog box window. I realize this might be a bit substandard, but here's what I'm trying to do. User clicks the browse button, and ...
0
votes
1answer
26 views

WordPress Ajax Call inserting data but success response false

I'm trying to post data to a custom table via Ajax call and it works fine (rows are being inserted in MySQL custom table) but I'm not getting success response true in console.log. Here is my code. PHP ...
0
votes
0answers
20 views

Automatically Close wordpress media uploader after click on upload image

i am using one function for automatically insert image in post after user upload image in wordpress media uploader but problem is that wordpress media uploader is still open after user upload image. ...
0
votes
0answers
17 views

WooCommerce event works in jQuery but not in JavaScript

I'm using WooCommerce hook added_to_cart which works perfectly in jQuery, but doesn't work in vanilla Javascript. Both functions are running on document loaded. Here is my code reference: JavaScript ...
0
votes
1answer
56 views

Wordpress POST AJAX call, var_dump($_POST) NULL and AJAX response empty when inside ob_start

i have a nav tabs when i click on a tab, i want it to return a specific type of posts, here's the code html one of the tabs: <ul id="menu-menu-secondaire-blog" class="nav nav-tabs&...
0
votes
0answers
24 views

Wordpress Sudden Loss of All CSS And Tons of JQuery Errors

All of a sudden all the css on the wp-admin page of a Wordpress Site that I'm providing some maintenance for dropped out. It really came out of nowhere. I'm not sure what caused it. I took some pics ...
0
votes
0answers
21 views

Adding Custom Image Upload button to uploaded image and Automatically inserted into post?

I successfully added custom image button at my classic editor with this code add_action('media_buttons', 'add_image_button'); function add_image_button() { echo '<a href="#" id="...
0
votes
0answers
18 views

Add other class content with reference class value

Hello, in my Wordpress project I have reference values that I have enclosed in yellow and red lines using custom fields (can vary; orange, purple, etc.). I want to print the same values in the other ...
0
votes
0answers
15 views

Allow non logged-in users to upload image to the media gallery?

I'm trying to get uploads to work on the front-end for a client. Currently, they work exactly as I need them to when I'm logged in, but for anyone that isn't it times out. It seems like it should be ...
1
vote
1answer
73 views

Jquery function working in Chrome Console but not in the code [closed]

I'm Using Wp-optin plugin and I want to display the form first before the wheel. I've written some jQuery script to hide the wheel and only show the form first, after the form has been filled, it will ...
1
vote
1answer
44 views

WordPress Sending data to Ajax with select option

I'm pulling my data from the database and then I want to load the pulled data with ajax but I am not able to do so. Following is my code. jQuery code: jQuery(document).ready(function () { jQuery('#...
0
votes
0answers
21 views

wp_query with pagination via ajax in WordPress

I want to show custom posts by WP_Query with Pagination in WordPress. When I click the next button, then reload the page & go to admin-ajax.php. But Posts are load well, the main problem is ...
0
votes
0answers
5 views

Send selected Woocommerce variations in email and then a button to open them in Browser

I'm using Woocommerce extra product options plugin in my woocommerce website. What I need is a 'Send Price' button below add to cart button that will send all selected variations and option to an ...
0
votes
0answers
22 views

internal anchor links no longer working after upgrade

Here is my website www.ownscene.com. You can see the main button on the top, when mouse hover browser says it anchor to #port but when I click nothing happened. This happened after multiple WordPress ...
1
vote
0answers
26 views

WordPress function not being called from jQuery method

I’m very new to WordPress Plugin Development. I’ve been learning and developing my plugin for around 2 weeks now. My plugin is supposed to be a retrieve a question from the WordPress database and ...
0
votes
1answer
44 views

How can I fire a jQuery event once getBlocks() actually returns the post's blocks instead of null?

In the editor, I am trying to loop through all the current post's blocks as soon as everything is loaded and ready for me. wp.data.select("core/block-editor").getBlocks(); is able to ...
0
votes
1answer
178 views

How to run Javascript popup modal in a loop?

So I have this popup modal: HTML: <h2>Modal Example</h2> <!-- Trigger/Open The Modal --> <button id="myBtn">Open Modal</button> <!-- The Modal --> <...
0
votes
1answer
39 views

Why isn't the 'no results' being shown when a query returns no results?

I've been following this tutorial for a simple AJAX filter search within wordpress: https://itsmereal.com/simple-ajax-filter-search-for-wordpress/?unapproved=3915&moderation-hash=...
1
vote
1answer
21 views

Getting the URL of the parent page

I am developing a property listing site in which the link of the single property unit is often sent to the clients so now I need a "View Property Details" button on my single unit page which ...
0
votes
0answers
22 views

How to Create custom Category Dropdown box using Ajax and Jquery without plugin

<select class="form-control" id="search_cat_data"> <?php $cat_args =array( 'taxonomy'=>'product_cat'); $categories=...
0
votes
0answers
48 views

Why do I need to reload the page for WordPress to see the new custom field added with jQuery

I added custom meta boxes and dynamically add an image loader button to it. The first image uploader works fine, it is generated by php. But, if I add a new row with an image loader button, then ...
1
vote
1answer
35 views

Can I use a jQuery Ajax request in Code Snippets Plugin for Wordpress?

I am using the Code Snippets Plugin for WordPress to send a jQuery Ajax request but I keep receiving a POST https://example.com/wp-admin/admin-ajax.php 400 (Bad Request) I have tried what seems to ...
0
votes
2answers
51 views

How to use jQuery in WordPress 5.7+

If jQuery is included in WordPress, why do I get 'jQuery is undefined' errors? I cannot find a tutorial (one would think this would be in the WordPress docs) on how to use jQuery in modern versions of ...
0
votes
0answers
26 views

jQuey Popup no longer working

I'm guessing this may be something to do with WordPress 5.5 but a little code snippet in one of my pages no longer works. To enable a little popup I used... echo ub_modal('response-popup', 'lg', $...
0
votes
1answer
22 views

Is textarea always accesible throught textarea#content in wordpress dashboard for a specific page?

In the wordpress dashboard/admin area of a page. I add this event handler to jQjuery. When I click the button with the name btnSave the content-editor replaces it's content to the text wow (It's not ...
1
vote
0answers
62 views

How can I get my Calculate Contact Form 7 field to update with jQuery? [closed]

UPDATE: I am using Contact Form 7, and the Contact Form 7 Calculator plugin: https://wordpress.org/plugins/cost-calculator-contact-form-7/ I have a form with checkbox fields (member fees) that add ...
0
votes
0answers
55 views

Saving form with AJAX for WordPress Plugin

I am developing a WordPress plugin that needs to have multiple profiles that the admin can create on the Admin screen. The plugin appends a block to the end of every (unless specified otherwise) post, ...
0
votes
1answer
14 views

I changed .live() to .on() but change is not reflected on the server

I downloaded a quantity increment plugin (themeszone Woocommerce ajax quantity) for my Wordpress site. Some of the Jquery was outdated this line specifically; $('.tz-qty-cont').live('click', function()...
0
votes
0answers
74 views

Using a jQuery change function on select menu after AJAX populated it

I created a custom post type with custom taxonomy, made a page to display the posts, and built two dependent select dropdowns to sort them. The first select is the top level categories. The second ...
0
votes
2answers
50 views

WP AJAX post filter > do something with empty value

I have my AJAX post category filter working fine on my site, thanks to the generous posts of folks like yourselves. What I can't seem to find is how to do something in the AJAX/jQuery script if the ...
1
vote
0answers
49 views

Change upload folder for a CPT

I have a CPT called "Musterkuechen". Users have access to a custom dashboard that I created with ACF Frontend. They do not have access to the wordpress backend. When I create a new post in ...
0
votes
2answers
580 views

403 error When i send ajax request on Wordpress website

i have to create a specifif form ta register data into the database and send a mail without refreshing the page so i create a script.js file : (function ($) { $(document).ready(function () { ...
0
votes
0answers
13 views

WP Media Change the upload dir only on this specific upload

There is some way that i can make the upload goes directly to my plugin only on this upload? $('#upload-btn').click(function (e) { e.preventDefault(); var image = wp.media({ ...
1
vote
1answer
148 views

Adding JavaScript to a WordPress website

I have a JavaScript code snippet that I'd like to add to my WordPress + WooCommerce website: $(document).ready(function() { $('.input-text').on('input', function() { var valueLength = $(this)....
0
votes
0answers
45 views

How to add php variable inside wc_enqueue_js('jQuery') function?

wc_enqueue_js(' jQuery("img:not([title!=\"\"][title])").each(function() { jQuery(this).attr("title", jQuery(this).attr(<?php get_the_id() ?>)); }) ...
0
votes
0answers
176 views

jquery.min has very long TTFB

I have noticed recently some plugins like Jetpack, Yoast and Wordfence in my WordPress admin take a long time to load. I investigated the issue in Chrome console and noticed the TTFB to load jquery....

1
2 3 4 5
46