A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
1answer
71 views

JS file is not loading when i put wp_head() and wp_footer

In my WordPress project I need to use a WordPress plugin, For that plugin to work I have to put wp_head() and wp_footer(). But when I put that than my slider's JS file don't load. <script ...
0
votes
0answers
23 views

Refresh the Customizers preview after editing fields

I'm using ACF fields on a few custom widgets. While using the Customizer to edit fields, they will save on change but the preview will not refresh. Calling wp.customize.previewer.refresh() will ...
0
votes
1answer
27 views

How to run JavaScript function in WooCommerce checkout?

I'm building reCAPATCHA into my WooCommerce checkout. It is a fairly easy process as I'm using woocommerce_checkout_process to validate the capatcha. However, I have running into one issue. When ...
0
votes
2answers
75 views

Enqueue Javascript After ALL Other Scripts (Including Async Scripts)

I have a script I'd like to include with Wordpress. This script relies on another (prettyPhoto) to run, as well as on JQuery being loaded. I'd like my script to be the very last script to be included ...
0
votes
0answers
39 views

Onclick Save Text In Input Field

Currently, I have a front-end form on my client's wordpress site that allows users to create a post. I'm using the pods plugin to create cpt, custom fields, forms, etc. I have several input fields in ...
0
votes
0answers
21 views

Connecting a wordpress site to an AngularJS APP

Currently I have a application that needs a blogging system added. The application is built with an AngularJS front-end and a python/Django back end. I wanted to use wordpress as the blogging system ...
0
votes
0answers
17 views

media image not showing after adding ajax google api

I have added a script in my header.php and ajax file <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script>....</script> But due ...
1
vote
4answers
69 views

Need a method for base_url() or home_url() in CF7 additional settings [closed]

For a redirect in CF7, on_sent_ok: "location.replace('https://www.mywebsite.com/pageid')" works well in the additional settings but I need to make my website more portable. I would like to use a ...
1
vote
1answer
41 views

accessing wp.media api from a tinymce plugin

I'm trying to create a tinymce plugin that generates a shortcode containing two image ids: [image-fade old="xx" new="yy"] I would like to let users select images directly from the media selector ...
-2
votes
1answer
26 views

Get current day using javascript [closed]

I'm trying to get the current date using JavaScript. Is it possible to do that? I want to add classes to some DOM element and it depends of the day of the week. Which element should I add to this ...
4
votes
3answers
549 views

Remove extra Google Maps script

I'm developing a plugin that use a Google Maps API. The plugin enqueuing script in this way: wp_enqueue_script('google-maps', ...
0
votes
0answers
33 views

Customizer Api: Load settings and controls from dynamically generated array

I have a front_page setting like so: $wp_customize->add_section( 'front_page', array( 'title' => __( 'Front Page' ), 'priority' => 120, ) ); I am trying to allow the user to do ...
0
votes
2answers
36 views

Disable submit button order

Here is a snippet of my code <?php echo apply_filters( 'woocommerce_order_button_html', '<input type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" ...
0
votes
1answer
36 views

How to capture a variable query string, then append it to all URLs in a Wordpress site

I have a site in which people will be sent there with various promo code query strings (that will change all the time), i.e., www.example.com/?source=emailad How would I capture the query string, ...
0
votes
0answers
40 views

Can't change javascript files

I've deleted a javascript file from my server, but it appears to still be there when making requests to the web server. I made a GET request with cUrl to the specific .js file to make sure there ...
1
vote
0answers
65 views

PHP array to JS array to use in google map

Hi I want to use some data stored in a php array to use it in google map api, to populate multiple locations in a the map. I use the loop to create my php array. <?php while ( ...
-2
votes
1answer
54 views

WP site makes mobile browser crash for high memory usage

I have this site: http://theguiltycode.com It uses foundation as a theme and is hosted in bluehost. I can load the site without much problem in desktop browsers, but in mobile the site reloads like 3 ...
0
votes
1answer
40 views

WP Media Uploader modal conflicts with Bootstrap modal

I was creating a form in a Bootstrap Modal to allow users to create new posts from the frontend. Everything seemed alright until I wanted to upload a file to the media library or choose one already ...
0
votes
0answers
44 views

Extending TinyMCE to Work with Medium Editor

I'm trying to extend tinyMCE. What i'm trying to achieve is to use this Medium Editor extend tinyMCE functionality as buttons within the backend Page / Post / Custom Post Type. This is similar to ...
0
votes
0answers
32 views

How to fill up in tags?

i have some problem to fill up the data Here is my code $.getJSON( url + input + "/keywords?" + apikey, function(tmdbdata) { $.each(tmdbdata, function(key, val) { if(key == "keywords"){ ...
0
votes
1answer
45 views

I need help implement a Javascript code into the PHP file

I need help implementing a Javascript code into my PHP file that would replace the default search box with a new one. Do I have to use echo? How would it look like? Thanks in advance or your help, ...
0
votes
0answers
15 views

How to hide a Control in the Customizer?

I know contextual controls hide if for example the user navigates from the viewer certain pages. But how can I achieve hiding a control under this scenario: There is a type Select Control with an ...
0
votes
0answers
39 views

how to make video autoplay on website in mobile using revolution slider

I understand that the video can't be played on mobile devices because of the ruling of the mobile data and other requirement. i also read comments on other articles on support. but i read some ...
0
votes
1answer
49 views

JQuery and Javascript to pan image

I am trying to implement a panning effect on an image, by following this tutorial. However, it's not working and I think it may be due to the way the javascript is being referenced. The image that I ...
0
votes
1answer
55 views

How to integrate a JS fiddle?

Dear StackExchange community, My goal is to add a second horizontal scrollbar on a very wide HTML table. I have downloaded a JS file recently that I wanted to use it on my website: ...
0
votes
1answer
37 views

Simple JS function Not Working

I have been trying to get a simple JS function to work for the longest while but its just not working. Console says "test is not a function. echo '<input type="hidden" ...
1
vote
1answer
33 views

Show post in slider

I am working on wordpress project .I want to show the post details in such away that the first four post thumbnail would show on the top and show the content of first post below, after clicking on ...
1
vote
1answer
41 views

Storing posts from query and accessing later via AJAX call

To clarify the above question title, what I am trying to do is create a grid of posts, for which I am displaying a thumbnail of an image that is attached to that post. Then, upon clicking each of ...
0
votes
1answer
207 views

wp.template() Not a function

When I console.log(wp) the object only includes: -wp.emoji -wp.heartbeat -wp.svgPainter Script is loaded in the footer and last in the DOM. What am I missing?
0
votes
0answers
18 views

add <script data-pagespeed-no-defer> in wp_register_script function [duplicate]

I’m using PageSpeed on my website and it makes a huge speed difference in my website I have defer JavaScript on. And I’m facing an issue with a script that doesn’t work when deferred so I want ...
0
votes
1answer
50 views

Add a downloaded JS file to WordPress

I have a very large table (horizontally speaking) on my webpage and I added a scrollbar using the "overflow-y: auto;" property on my CSS, which does what I want. The problem is that this table is ...
0
votes
1answer
20 views

javascript not loading

Here is what I've done so far in functions.php function imk_scripts() { wp_enqueue_script( 'bootstrap_js', get_template_directory_uri() . '/js/bootstrap.min.js', ...
1
vote
2answers
216 views

How to use WordPress (PHP) functions in AngularJS partials files?

I am using AngularJS to load a list of my WordPress posts, however I can not get any of my PHP functions to work with my partials file. I've tried using something such as search.php instead of ...
1
vote
1answer
54 views

How to get javascript slider to work! [closed]

I've only just started to develop my own themes and i'm stuck adding javascript to my slider. I've added the slider into my index.php file as below: <div class="carousel"> <div ...
0
votes
1answer
51 views

Javascript code for Category

can I check if scripting can be encrypted for specific categories? For example, I would like to encrypt only for http://www.example.com/category/news/education, for ...
0
votes
1answer
28 views

Having trouble going from Jfiddle to implementing in Wordpress :(

If someone could point me in the right direction on how exactly to do this without yelling about follow codex site lol. I wouldnt be here if I wasnt able to get it working haha. I created a neat ...
0
votes
0answers
31 views

how to display term name angularjs

I've recently learned about angularjs and I am trying to display a term associated with a specific custom taxonomy. So far this is what I've tried in my partials file - <div ng-repeat="post in ...
1
vote
0answers
32 views

Dynamic Custom Fields

I am working on a custom invoicing system for a client. I am looking for the best way to implement adding products dynamically to the invoice in the wordpress admin. There are hundreds of products ...
0
votes
1answer
40 views

Issues trying to get an element by id

I'm trying to incorporate javascripts in my wordpress posts. I've previously done it by just adding it to the post in the wordpress editor, but I've heard the better way is to add it to a js directory ...
0
votes
1answer
28 views

Run JS Code on userlog out

I'm trying to delete a variable stored in local storage when user logs out of WordPress, none of the two code blocks below work for me, both have been tested in my functions.php file one at a time. ...
0
votes
0answers
27 views

Javascript attr href not appending parameters on WordPress site

I have this exact code set up and running on a regular HTML/PHP site but when I tried setting it up in WordPress, it doesn't work. The code itself works, the Javascript is present when I view the ...
1
vote
1answer
61 views

angularjs not displaying all posts

I learned about angularjs today and I am trying to create a page for my search results so that I can be able to create facet filters. Currently I have a page template with the following code -- ...
2
votes
1answer
58 views

Add colorpicker to featured image

I'm trying to add a colorpicker to the featured image meta-box. Here is some background: I use the featured image meta-box to place parallax background images. Because a user is allowed to place text ...
0
votes
0answers
44 views

Enable/disable code in functions.php with options

Is there a way to enable or disable lines of code in a themes functions.php file? Basically I would like to have a page in the admin panel that lists "modules" or separate php files and has the ...
-2
votes
1answer
57 views

Javascript code not working - $ is not a function error

On redesign out web site we wanted to add the slick js carousel function on the homepage. Followed the instructions to the slick javasriprt website http://kenwheeler.github.io/slick/ but it does not ...
1
vote
1answer
33 views

How do I remove the date and category form my portfolio pages

This is one of my portfolio page Whenever I wanted to remove dates and category from blog posts I always used this code function jl_remove_post_dates() { add_filter('the_date', ...
0
votes
0answers
46 views

WP Disclaimer Popup Plugin Tweak

I am using WP Disclaimer PopUp by Art Armstrong and it is really perfect for what I'm doing. However I need one small simple tweak. I tried to hire him to do it but didn't get an answer. Whoever ...
0
votes
0answers
26 views

Javascript in WordPress Navigation - mobile menu

I added a Live Chat link to my WordPress navigation menu. I followed the Ideal solution #2 below which works great on the desktop, but not on the mobile menu. It doesn't do anything on mobile. Any ...
-1
votes
1answer
66 views

Gravity Forms closes my popup on Validation Error [closed]

I am having an issue with Gravity Forms. A user on my site can open a contact form in a popup menu by clicking a 'contact' button. The form is just in an absolute div that I show/hide on the contact ...
1
vote
0answers
49 views

PhantomJS with wordpress

I know it sounds basic but I'd really appreciate some help/guidence on how to use phantomjs on my wordpress project. I'm using Windows 8.1 and local host with xampp for now. I've downloaded phantomjs ...