A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
1answer
8 views

How do I add some javascript validation to the admin interface form's onsubmit?

I have a plugin that adds meta boxes to the admin interface and I need to do some validation when the user presses the "update" button before the form is submitted. Is there a WordPress action or ...
0
votes
1answer
15 views

Switch between tabs on “Insert Media” dialog

I'm writing a file upload plugin and want to emulate original Wordpress behavior: user uploads file on "Upload Files" tab after upload is complete, "Media Library" tab is activated with just ...
5
votes
2answers
1k views

How to provide translations for a WordPress TinyMCE plugin?

I know that I can get my translations into JavaScript doing: $MyTranslations = array( 'translation1' => __("Some String 1", "MyTranslations"), 'translation2' => __("Some ...
0
votes
2answers
20 views

How to register and enqueue JavaScript files without breaking plugin dependencies?

In theme development, what is the best way to register and enqueue JavaScript files to avoid problems with plugins? I want to create a theme which uses scripts like jQuery, Masonry and so on. I ...
0
votes
0answers
18 views

getting Uncaught TypeError: undefined is not a function after update WordPress 3.8.3 [on hold]

My Checkout page showing working in http://amargedget.com but never finished. I checked the chrome console window and found following error message in checkout.min.js?ver=2.1.7:1 of WooCommerce ...
1
vote
0answers
20 views

Wordpress 3.8.3. custom theme - sliders won't load js/css files

I'm building custom WP theme and I have issues with sliders. None of those I've tried to install worked. When I looked into the developers console, and searched for their js/css files, they where not ...
1
vote
0answers
13 views

Search broken due to uComments - I found the JS file that is causing the problem [on hold]

I was unable to search my site until I ran the plugin Deactivate/Activate test. It was uComments. This plugin has a file called functions.js which is causing this problem. I do understand it has ...
0
votes
1answer
843 views

Script help for a Preloader (hide page until all elements load)

I tried Ultimate Preloader (Wordpress plugin) and it flashes parts of the page before hiding with an overlay div. I think this is because the PHP is rendering the page before the plugin's javascript ...
0
votes
1answer
500 views

Placing Ads after every 10th Post with Infinite Scroll

Hello at the moment what I have to do is load a couple of ads, some normal html and two are java script. I've tried the PHP method of this: <?php $postnum++; if($postnum%10 == 0) { ?> <div ...
-2
votes
0answers
29 views

404 hijack in WooCommerce [closed]

A website I'm working on is having a very odd WooCommerce issue. This only happens when WooCommerce is activated with pretty links. Any 404 errors are redirected to an external website which I have no ...
0
votes
2answers
3k views

Add captcha validation to my custom form for Frontend posting

i have implemented the frontend form, which enables UNREGISTERED users to post on my site. Everything in working perfectly, the only problem I have is with the implementation of the captcha. All of ...
0
votes
1answer
63 views

How to make Plupload zones that will survive changes in core?

I had recently implemented custom Plupload form in a plugin (located in admin area and working with SVG files). Plupload has half a ton of settings, provided for WP's own upload zone by ...
-1
votes
0answers
12 views

How to add a date picker inside a contact form plugin [duplicate]

Is there any way to add a date picker to text field without customizing css and all. javascript is fine
1
vote
1answer
17 views

Wordpress Scripts Being Loaded in Footer

I've bought a theme for a Wordpress site. I noticed that the theme author has added the javascript to the footer for load time, but as I use Gravity forms, I understand that some of scripts need to ...
0
votes
1answer
32 views

WordPress Displaying Thumbnails Vertically :(

WordPress is displaying my thumbnails vertically and VERY LARGE. Specifically it's displaying WooCommerce product page thumbnails vertically and VERY LARGE. Can't seem to figure out why or what piece ...
0
votes
2answers
33 views

Seperate functions.php for part of site

I built a custom WordPress site for some artists. I'm making one page that is entirely different from the rest of the site. Actually, that and a single.php page. It's for a specific new book, and the ...
1
vote
1answer
124 views

Trigger Customizer saving process with Javascript only

I'm working on a custom theme that uses WordPress Customization API to let the user play with parts of the content of his website, basically the front-page which he can modify by adding/removing ...
0
votes
1answer
245 views

How to add a onclick attribute to a list of checkboxes?

I have this array for checkbox: array( 'name' => __('Latest Product',''), 'desc' => __('Select if you want to display latest product',''), 'id' => $prefix . ...
0
votes
1answer
321 views

How to make featured image thumbnails on index page load smoother?

I'm using a theme called Hatch Pro, which is a gallery based theme and the index page displays the posts using the featured image. You can see it here. On slower browser environments, the images ...
2
votes
1answer
251 views

Menu Link Redirect Based on Username or User ID

I am building a client portal where my clients can log in and see all their pending projects, completed projects and create new projects. Though I'm stuck at the start. The dropdown menu is called ...
0
votes
1answer
34 views

Ajaxurl suddenly not defined

I am developing a wordpress plugin where I use an ajax call to submit form data, it was working fine and then all of a sudden I get a console error saying that ajaxurl (the url passed to the ajax ...
0
votes
1answer
60 views

Handling an Ajax form submit

I am developing a wordpress plugin that will create a contact form and then submit the details through an ajax request. jQuery.ajax({ type:"post", dataType:"json", ...
1
vote
1answer
30 views

How to get the title of the item that is clicked on

Situation: I've created a custom post type for events, visitors can sign up via a form. The form pop's up inside of a modal when the attend button is clicked. As you can see, I'm using a hidden input ...
1
vote
2answers
37 views

Directly using pure JWPlayer JS (but NOT WP Plugin)

First of all, I'm not using WP JWPlayer Plugin. (And i don't want it. And thats the another story) Well in the Template file: wp_register_script('myJW', get_bloginfo('template_url') . ...
0
votes
1answer
370 views

Replacing &#038; in JS code on pages

I am needing to remove the &#038; that seems to be replacing my & on my page code. My original code looked like this: ...
2
votes
1answer
100 views

White text on white background in TinyMCE when wp_editor is called in WP 3.9

One of the features of my plugin is to add a TinyMCE editor instance inside a meta box on the Edit Post screen. This has worked great up until 3.9, and I'm not clear as to what's going wrong. Here ...
0
votes
1answer
736 views

Ajax page load without reload

I am working on a script to load my page without refreshing. It is working as I want it except for one thing. The test site I have up is http://dev.dog-company.com . Only home About us and FAQ will ...
0
votes
2answers
904 views

Want to add comments to NextGEN Gallery

Does anyone know how to do it? I would like to implement Facebook or Disqus comments. I am using the gallery with the shutter effect. Thanks for your help!
1
vote
2answers
2k views

Repeatable custom meta fields

I am working on creating custom meta boxes for the back-end of WordPress. I would like to add a metabox with several fields, in my case an image upload and a text input, but with a button that can ...
0
votes
1answer
239 views

Custom attributes to javascript tags

My site uses cloudflare but I really want to enable rocket loader, but if I put it on automatic mode, it messes up my whole site... So I googled and found This answer which has helped in terms of ...
0
votes
1answer
32 views

Custom field in external Javascript

How do I use a custom filed value in an external javascript? I'd like to use a custom field already stored for a post that is an url in an external javascript <script type='text/javascript' ...
0
votes
0answers
14 views

Defer all js except certain ones in functions.php file

I read How to add defer="defer" tag in plugin javascripts? and the code @toscho posted works good to defer certain js files or deferring ALL js files by commenting out the contact-form-7 ...
0
votes
2answers
324 views

Unable to load “wpColorPicker” on theme customize page

Whether I'm using a Wordpress default theme or a custom one, I see the JS error: Uncaught TypeError: Object [object Object] has no method 'wpColorPicker' when I click "Customize" on the theme. I've ...
0
votes
1answer
248 views

Issues with quicksand portfolio setup

So I am using the jQuery quicksand plugin in combination with prettyphoto and tooltipsy. My php template: <aside id="work_nav"> <ul class="work_tags_nav"> ...
0
votes
1answer
37 views

Social share buttons text shows up on post excerpts

I'm using the Social Likes plugin and there is one problem. The text on the share buttons show up in the excerpts. For example, I grabbed this off of one of the post excerpts: ...
0
votes
1answer
909 views

Parse wordpress blog data using json api and ajax

I have seen lots of responses to how to extract data from wordpress blog posts using the json api plugin. Many uses $.getJSON, $.ajax, .responseData.feed.entries, success function() etc. What is the ...
0
votes
0answers
24 views

Pass the post ID

Okay what I am trying to do is run JavaScript of the user is not logged in! I have been given the following script by the maker of "Restrict Content Pro" (The plugin I am using) function ...
0
votes
1answer
387 views

Close Fancybox, sumbit form data and redirect

I have a Wordpress and WooCommerce site for a client, and to create a little twist on the customizing on a product I have a external html-page opening in a FancyBox iFrame using Easy FancyBox plugin ...
1
vote
1answer
28 views

Customizer: When to use customize_preview_init VS customize_controls_enqueue_scripts

There appears to be some conflicts between the codex and the twentyfourteen theme code with respect to which action to hook to load your live preview .js (ex: customizer.js) In the twentyfourteen ...
0
votes
1answer
34 views

Wordpress permalinks and javascript redirection

I need to use javascript redirection in one of my scripts. With /%postname%/ WP permalinks structure redirection works like it should but with default it always redirects to home page. /%postname%/ ...
1
vote
2answers
39 views

add javascript files only when plugin is called?

I'm writing a WP plugin that might be called on any page using a simple function call:getDeck(Deck_id) - and i'd like to add my javascript files on pages where this function is called ONLY, as ...
0
votes
2answers
32 views

add jquery file if a certain page is included

I was wondering if anyone could help my by explaining if it is possible to enqueue a javascript file only if for example homepage.php is included. what i have tried to do inside homepage.php: class ...
0
votes
1answer
28 views

I have an old version of jQuery showing up. How do I figure out where it is coming from?

I am fairly new to WP, so I apologize for this very basic question, but I am working on a site that has an older version of jQuery showing up. Here is the jQuery reference I have placed in the ...
0
votes
0answers
30 views

How to add external remote JS source to Gravity Forms?

I would like to add an external javascript source to my Gravity Form. Like this: <script type="text/javascript" ...
1
vote
2answers
35 views

JavaScript added as link/stylesheet

I am just trying to create a plugin that will add some JS to the header and custom CSs. I have this below but it adds the css wrong and shows as JS. This is first plugin i have attempted. <?php ...
0
votes
1answer
39 views

Ajax, jQuery and Wordpress

I'm having trouble getting AJAX and jQuery to work with WP, and wondering if someone can point me in the right direction. I have a form, and I want to pass the data from the form to a PHP function, ...
0
votes
1answer
74 views

Meta slider plugin only works after first refresh - Object has no method 'flex slider'

I have a wordpress theme I am using called 'Nordic', however I did not like their slider plugin, so I used my own... '[Metaslider][1]' The problem is when you first load the page, the slider does not ...
0
votes
0answers
18 views

Check for new posts in the loop every x mins/seconds

I'm trying to think of a way to check for new posts in the current loop (e.g. author, or tag) using ajax to give a live blog feel without reloading the whole page. Is it possible to 'fire' the loop ...
0
votes
0answers
36 views

Local path included in script url

The hosting service of a website I created crashed, now we're trying to get it up and running again. They restored the website/database from a backup but we're encountering issues. A couple of ...
0
votes
3answers
393 views

Theme Customizer not loading JS for live preview

I am currently working on adding options to the theme customizer. For the last two hours I have been trying to get the live preview working and I am trying figure out why my theme isn't loading the ...