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

How to remove jquery migrate on selected posts

There are working solutions to remove jquery-migrate (popular solution), however NONE for selected posts. The problem is that they all rely on wp_default_scripts hook, where post id is not defined yet....
user avatar
  • 111
0 votes
0 answers
23 views

Get URLs for AJAX Filter Checkboxes WordPress

I have a problem with showing and generating URLs for the pre-checked filter. So basically I need links for a specific filter, for example, I'm choosing the Location, the Salary, the Type of Work and ...
user avatar
0 votes
0 answers
9 views

How to display contact form 7 form in vanilla js without jquery in frontend

Backend jquery Frontend Vanilla JS Contact form 7 Wordpress I have a task to display a cf7 form on the frontend using vanilla javascript . From what I've read, this can be done using admin_ajax.php. ...
user avatar
0 votes
0 answers
14 views

Validating an email input from form field before submit using JQuery, AJAX, and PHP

I have a form and one of the fields is an email with id email and after the user inputs their email and clicks outside the field, I wish to get the value of the email and then use ajax to pass that ...
user avatar
  • 1
0 votes
0 answers
11 views

Change each text after 4 second and each image after 2 second

Basically first two images(image1, image2) from array depend on first string(String1) from array. and other two images on String2, so i want string1 change after 4 second but in this time two images ...
user avatar
0 votes
0 answers
39 views

Why does PHP called with Jquery AJAX not allow additional php code to be added?

I wrote a plugin a few years ago that successfully uses AJAX and then recently I tried to add more of the same functionality but it fails. In the PHP files, I localized admin-ajax into the JQuery ...
user avatar
0 votes
1 answer
11 views

FacetWP breaks jQuery events

I'm experiencing a problem almost identical to this one: my sorted results inside the .facetwp-template element contain a jQuery event (an email address that toggles on click) which works fine upon ...
user avatar
  • 13
0 votes
1 answer
24 views

Execute PHP code only with specific user role

I have a WordPress website with woocommerce and I want to set a minimum order quantity for products. I have found code online which does exactly what I need it to do and it works perfectly.(the code ...
user avatar
0 votes
1 answer
37 views

How to use the wpsnonce clone post link?

I have this link from a CPT, to clone a post, in this case post=30808: https://domain.com/wp-admin/admin.php?action=duplicate_post_clone&post=30808&_wpnonce=240f0078e7 Now, I need to use this ...
user avatar
1 vote
0 answers
28 views

Problems with wordpress nonces in Ajax call

i am having big troubles with Wordpress nonces in ajax call. Basically i am trying to trigger a custom standalone php script i made on my custom theme that send emails to admins people whenever ...
user avatar
0 votes
0 answers
37 views

Theme JQuery inlcusion on Wordpress 6.0 always fails

I am writing here because i have Wordpress 6.0, i am trying to include JQuery in my theme beacuse i have to start working on a functionality i need. The problem is that JQuery is not loading correctly ...
user avatar
0 votes
1 answer
62 views

Meta field bulk editing no longer working in WP 6.0 [closed]

Until recently, I was using the following PHP and jQuery code for adding bulk editing support for a meta field (price) in a custom post type (Book): PHP: function show_bulk_edit_book_metabox( $...
user avatar
  • 1,637
1 vote
1 answer
54 views

WordPress notification if new post published

I use WordPress and I want to alert users if new post with post_type = job_post was published. Also I want to show amount of new post. So I add to function.php global $new_job_count = 0; function ...
user avatar
0 votes
0 answers
19 views

Ajax Favorite from foreach (how to specify which result result is processed)

I created my first ajax script which is an add-to-favorites option on my real estate site. On the single property page the setup works great...I check if the property is already saved, display a ...
user avatar
  • 3
1 vote
0 answers
18 views

Is there a way to programmatically create multiple pages utilizing the same template but different content from a json file?

I have been tasked with creating geolocation pages that will all use the same exact template. The content writer is giving me all the "text" for the pages (which I am converting to json). I ...
user avatar
  • 11
0 votes
0 answers
11 views

How to set value selected using select2 jquery plugin

In my file, i have small html bellow: <div class="dropdown-mul-2"> <select style="display:none;" name="dom767_options[all_posts][]" id="mul-2" ...
user avatar
0 votes
1 answer
12 views

How to remove js ui library added by default by wordpress

I am trying to remove some script files added by wordpress. However, the code I wrote does not work. Where am I doing wrong? Can you show me the way? I looked at many sources. But I couldn't find an ...
user avatar
0 votes
1 answer
38 views

Add php code to wp_print_scripts?

Is there a way to add inline php code to the editor using wp_print_scripts? I'm trying to find a way to display text from a php string into a value of input of a block. Here's my code: function ...
user avatar
0 votes
1 answer
30 views

Change quantity via jQuery and disabile quantity field [closed]

I have products where I need to disable the quantity field on the product detail pages and dynamically change the quantity based on another value. I change the value using this code: if (jQuery('body')...
user avatar
  • 249
0 votes
1 answer
27 views

I don't think WordPress is loading jquery or bootstrap js

I'm building a WordPress theme and I've used the code from https://codeinhouse.com/how-to-create-custom-post-type-slider-in-wordpress-without-plugin/ to build my slider I've also used https://github....
user avatar
  • 5
0 votes
0 answers
36 views

Display full WordPress post under search form using AJAX

Hi I am currently creating a site that shows interactions between different pharmaceutical drugs. I originally started with Live search on JSON Objects Data Using jQuery (originally based on this ...
user avatar
  • 1
0 votes
0 answers
27 views

Hot to check if new posts have been published since page load and notify online users?

I want to show a div notifying online users that there are new posts since they have accessed the page, in the index and also if new posts have been added in the category or tag they are browsing. I ...
user avatar
0 votes
0 answers
12 views

Change Dropdown jQuery to show/hide but with default place holder that shows all

How to set the jQuery so if default "Department" is selected show all, and only hide all else one other section made. for example, if non selected will be "Department", if "...
user avatar
  • 105
0 votes
1 answer
99 views

Cannot read properties of undefined (reading 'firstChild') using photoswipe in product page

<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"> <div class="pswp__bg"></div> <div class="...
user avatar
0 votes
0 answers
10 views

Customizer control save then return to default

Is it possible with default wordpress controls to use the radio control then save then automatically revert to default after each save. For example radio select 0, 1, 2 is option and you select 2, ...
user avatar
0 votes
0 answers
52 views

wordpress mysql / wpdb ajax load more for terms help

Can anyone pls assist me with my problem. I am not asking for code, but even some guidance as to how to get this working. I have tried many ways, to get my terms to load using ajax load more and seem ...
user avatar
  • 16
0 votes
0 answers
18 views

Wordpress Select Option Load Custom Fields

I created a new post type called "Programs" and i created custom fields on Programs width Advanced Custom Fields plugin. I want to compare the Programs fields with each other on the page ...
user avatar
0 votes
0 answers
11 views

WordPress cascading dropdown selection search based on Parent Page & Child Page

How would I create a cascading dropdown select search where the first dropdown would host selected Parent Pages and the second to display the Child Pages of the selected Parent. When submit button is ...
user avatar
  • 11
0 votes
1 answer
76 views

Bootstrap and jQuery error: $ is not defined

I'm trying to use the Bootstrap collapse component and just can't get it to work. I believe the HTML is proper, but whenever I click on the element that should trigger the collapse, I get an Uncaught ...
user avatar
  • 13
0 votes
1 answer
31 views

is_page_template() written in jquery/javascript

With php there is a wordpress function is_page_template() Is there a similar function written in jquery/javascript? To use with the wp.customize api and jquery/javascript.
user avatar
0 votes
1 answer
36 views

Axis guidelines over an image

I'm trying to implement this in WordPress: https://stackoverflow.com/questions/11461913/making-axis-guide-lines-over-an-image-that-follow-the-mouse-pointer I created this script in my theme folder (/...
user avatar
  • 1
0 votes
0 answers
55 views

How to set javascript options for select2 in PHP array of plugin

I'm using two different jQuery plugins that I'm trying to get to work together. It should be possible since they come bundled together. The first plugin is the Metabox.io plugin for creating metaboxes....
user avatar
0 votes
0 answers
66 views

Custom WP rest api endpoint only working on non https?

I'm googling like an hour for a possible solution while im trying to create my first custom wordpress rest api endpoint. If i call the endpoint by postman it just works, but if i try with jquery, it ...
user avatar
0 votes
1 answer
1k views

Uncaught TypeError: Cannot read properties of undefined (reading 'message') [closed]

I wrote authentication for the entry and membership of wordpress. The code I wrote is ajax. not work Validation and redirect. But he gives the following error: Uncaught TypeError: Cannot read ...
user avatar
0 votes
0 answers
45 views

Trigger jQuery to add events after AJAX-loading table in admin plugin

I created a small Wordpress plugin which has some admin-panels. I am using the WP_List_Table class to display some data, but this HTML-table is ajax loaded. Because of the ajax-loading, jQuery doesn't ...
user avatar
  • 101
0 votes
1 answer
177 views

On click load iframe [closed]

I have this html <a href="#1647278006925-e8321147-313b" data-vc-accordion="" data-vc-container=".vc_tta-container"><span class="vc_tta-title-text">...
user avatar
0 votes
0 answers
19 views

Putting custom html/js page into Elementor as it's own block

I have a working custom html/javascript page that I created and then FTPd into my wordpress site as a custom template which I'm applying to a blank page. However, I have elementor pro and though I may ...
user avatar
  • 113
0 votes
0 answers
35 views

Tracking Visitor LatLng with Wordpress using JS, PHP. How to put data which was extract using JS into DB

Case: I tried to implement via js a geolocation tracker (not an IP Tracker). The code snippet is under Divi > Integration > Body Tag (Divi Page Builder). Afterwars i build via PhpMyAdmin a table ...
user avatar
0 votes
0 answers
25 views

Custom html/php/jquery map code in Wordpress/elementor?

I have some code I used for a searchable map with hotspots (basically a directory search, like airbnb searching for a location). So I’ve used this code for Joomla in order to have a search bar that ...
user avatar
  • 113
0 votes
0 answers
11 views

Long contextual help needs two clicks to close

In our plugin, we are using enough contextual help on one page that you have to scroll to reach the "Help" button (#contextual-help-link") to close it again. When this happens (or in ...
user avatar
  • 111
0 votes
1 answer
31 views

Ajax on the Administration Side of plugin - wp_localize_script - how to pass value from JQuery to PHP function in class?

I have built a plugin and I need to use ajax in the admin and have followed the documentation here: https://codex.wordpress.org/AJAX_in_Plugins However, this is out of date and I cannot find any ...
user avatar
  • 31
0 votes
1 answer
40 views

Ajax on the Administration Side of plugin - returns 0

I have built a plugin and I need to use ajax in the admin and have followed the documentation here: https://codex.wordpress.org/AJAX_in_Plugins However, the response I keep getting is 0. I know ...
user avatar
  • 31
0 votes
0 answers
111 views

Ajax add to cart not updating Elementor mini cart totals

I'm using a custom Elementor button to add products to cart, the custom button HTML looks this like: <a href="?add-to-cart=321" class="elementor-button-link elementor-button ...
user avatar
  • 96
-1 votes
1 answer
239 views

can't add EVENT LISTENER to a element

I'm trying to add a click eventListener to a element in homepage, it doesn't work. the event is not even added to the element. the above picture shows the html of the homepage. where I wanted to add ...
user avatar
0 votes
2 answers
72 views

Uncaught ReferenceError: jQuery is not defined - although jQuery is loaded [closed]

I'm aware that this is a well discussed question, nevertheless I did not find any answer for my issue. I have the following code on a Wordpress page (inline, necessary for this project): <script>...
user avatar
0 votes
0 answers
19 views

wp post_tag change minlength

I try to change minlength value from post tag search in wp-admin (wp-admin/js/tags-suggest.js) -> .fn.wpTagsSuggest -> options -> minLength but cant override this value
user avatar
1 vote
0 answers
162 views

Understrap child theme JS not working in custom-javascript.js file

I'm developing a Wordpress custom theme using the child-theme of Understrap. I'm adding my custom jQuery to child-theme > src > js > custom-javascript.js, and the file is already commented ...
user avatar
0 votes
1 answer
15 views

Database entry removed on browser refresh, Ajax PHP jQuery

I have a form that updates columns in a database table on submit of a form via ajax. Everything works great, the database table columns get the information however once the browser is refreshed the ...
user avatar
0 votes
0 answers
19 views

how can i include post meta in search result

I have made this code to search for post but i want to include search also show post that have this meta '_wp_manga_alternative ' the code i made if($_GET['s'] && !empty($_GET['s'])) { $text = ...
user avatar
0 votes
0 answers
115 views

wc_get_template_part doesnt display the content [duplicate]

hello guys when i try to loop products it's just display the div but not product info the image of the result function stsearch_products($data) { $args = array( 'post_type' => 'product'...
user avatar

1
2 3 4 5
47