A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
0answers
72 views

Retrieve customizer value using ajax or customizer api and print the value in theme

one of my clients have Branches. one located in new york another in los angeles and etc... in the live site we print new york phone and address(from the customizer) as default. what i need is to ...
0
votes
2answers
31 views

Adding javascript blocks to a single file and adding it to the header

I don't know how to do it, but I have a few js code blocks in my sites header like the StatCounter tracking code, facebook like button js code, etc. Now the thing is that I want to combine all the ...
0
votes
0answers
32 views

admin-ajax.php is slow [duplicate]

On this site, it usually takes around 5-7 seconds for admin-ajax.php to process and return the response for when the user clicks on the plus icon on project hover. I'm not sure if this is a WordPress ...
0
votes
0answers
35 views

Improve my timetable's code

I'm working on a wordpress theme and creating a time table who will be easy to complete by users. In the back-office, there are a checkbox for each days : <input id="checkbox1" ...
1
vote
1answer
69 views

How to retrieve a value from an input field in a media view template

I've created a media view template with two input fields (width and height) and I was wondering how to retrieve the values entered in them in a media controller o view. PHP: function ...
1
vote
1answer
628 views

Implementing Isomorphic JavaScript (React JS) in Wordpress?

I'm about to start with a new project and would like to incorporate React as I want to learn more about it and this specific project would be perfect to get started as it's not that time sensitive and ...
0
votes
0answers
33 views

Get custom post type slugs in javascript in header

I am using the following javascript to show and hide various divs on hover: <script type="text/javascript" language="JavaScript"> function HideContent(d) { ...
0
votes
3answers
157 views

Dequeue script to prevent javascript event conflict on wordpress child theme

I've built a child theme of Divi Theme to use with Buddypress. So far so good, except for a script conflict on commenting buttons. The theme load a javascript (js/custom.js at 2642:2662) with the ...
0
votes
0answers
28 views

Locating and accessing the main js file

I'm hoping to find out exactly where this main.js file is located in wordpress and how to access it? "jQuery( document ).ready( function()"
0
votes
1answer
57 views

Handling AJAX with custom taxonomy custom fields on add

I wrote some extra fields for my custom taxonomy. I added the form fields to the add form. I got it to save by handling the appropriate values in $_POST. In 4.1.x, the add form is Ajax-ified. How can ...
0
votes
0answers
26 views

Change php via js, is it possible?

i want to change my headers dynamically ( not in WP admin dashboard ) <div id="Header_wrapper"> <?php if( header_style == 'header-creative' ) get_template_part( 'includes/header', ...
1
vote
1answer
100 views

Switch to the library tab in the media uploader

I'm developing a plugin that adds a tab to the media uploader to add external videos to the media library via oembed. Everything works as expected but I need to switch to the library tab after adding ...
0
votes
0answers
28 views

Theme Customiser not live previewing changes on pseudo elements

I've been working with the Theme Customiser API lately and found that pseudo elements are not live updating using the previewer. In my project I have an image containing a transparent overlay using ...
0
votes
1answer
610 views

Move all the JS files to the bottom|footer, the right way

In order to speedup my site load and prevent scripts from render the page I'm trying to move all the possible scripts (meaning JS files) from head to footer. After read and do some research I made ...
0
votes
0answers
382 views

500 (Internal Server Error) of external php file

I am currently using WP Web Scraper version 3.2. Once I insert the shortcode or template tag (php code) directly into my page, the plugin works perfectly fine and the values appear. I decided to place ...
0
votes
0answers
41 views

None of the JavaScript works when using wp_editor

I'm trying to create a front-end editor for my Wordpress theme using wp_editor. While it outputs the editor, there's loads missing from it. There's no title, no submit button and none of the JS ...
1
vote
1answer
35 views

No data received

When I use the wp_register_script() and wp_enqueue_script() to load the jquery for the wordpress I got "no data received result with other information like this : Unable to load the webpage because ...
0
votes
1answer
113 views

Close TinyMCE plugin window on click away

I've created a small plugin which adds a button to the TinyMCE toolbar. When clicked, it opens a popup window via editor.windowManager.open(). That popup can be closed by (1) clicking the "Cancel" or ...
3
votes
2answers
306 views

Allowing admin-ajax.php to receive “application/json” instead of “x-www-form-urlencoded”

I'm using AngularJS's $http function to send my payload to WordPress's admin-ajax.php subsystem, but it seems the latter only accepts x-www-form-urlencoded data, instead of the application/json ...
0
votes
1answer
111 views

Why is my script not working?

I know PHP, HTML, CSS and JavaScript but I'm kind of new when it comes to wordpress and digging in the source code. How ever I have made a very simple JavaScript Script. There is 1 .js file with alot ...
0
votes
1answer
129 views

I want to enqueue a .js file to my child theme

I tried to enqueue a custom .js file in my child theme directory. In the functions.php of my child theme I find the following code /* After this. you can override Accessible Zen's pluggable ...
0
votes
1answer
79 views

Custom JS text area in customizer is being formatted wrong in document

I have created a wordpress theme, in the wordpress theme customizer I have added a couple of text areas where a user can input their own CSS or JS to be added to the head. The placement of the text ...
0
votes
0answers
82 views

WordPress 4.1 Javascript Error

I'm working on a WordPress site and am getting a JavaScript error in the admin area when editing a post, which causes much of the JavaScript interactions to fail. I've activated the default theme and ...
0
votes
1answer
149 views

Theme now uses require.js and enqueue script no longer works

I created a small custom script that fixes a sidebar at different point depending on if there is a banner. I used enqueue script in my child functions file and then a custom.js file with my ...
0
votes
0answers
16 views

Insert custom taxonomy into javascript

I have a simple javascript to display a future time. The script is executed from post's content. <script type="text/javascript"> <!-- var currentTime = new Date() ...
0
votes
0answers
46 views

Trying to uswp_localize_script with Advance Custom Fields Repeater

I have an external javascript file that I am trying to change dynamically: Here is the Javascript that I want to be dynamic slides : [ {image : ...
1
vote
1answer
50 views

Wordpress Plugin with a shortcode that dynamically generates javascript. Can I use add_action without wrapping the javascript in a function?

Looks like the best way is using: add_action('wp_footer', returnJs); But if my returnJs function is inside my shortcode function and it's used more than once on a page it will return an error trying ...
0
votes
1answer
23 views

Creating custom URL for async content

I am using a fully asynchronous Javascript/jQuery portfolio gallery (Grid Gallery template in Photolux theme). When a portfolio item is clicked, the item's details loads. It is built-in in the ...
0
votes
1answer
58 views

Displaying contents of a tab

I have been trying to figure out how to accomplish what I need done which I can show here . I had asked this question in StackOverFlow which I got a good answer but I don't know how to implement it i ...
1
vote
0answers
75 views

Refreshing collections in the admin media manager

I know this question is very similar to this previously asked question; however, I was wondering if there was a more up-to-date/official way to refresh content programmatically in the WordPress admin ...
0
votes
0answers
39 views

Wordpress search query

I used code snippet, from the plugin http://wpadvancedsearch.com/, which works very well, but when I press a search button, it generates the following string in the URL: /?search_query=& and I ...
0
votes
0answers
12 views

Admin Categories validation

i am trying to validate user input when adding new category through WP , i use jquery.validate() and validation error appeared successfully , but after pressing add new category , the category is ...
1
vote
0answers
56 views

Media Upload , file name changed automatically

I face a problem that when i upload a video that named in non-english language , for example : Arabic , it placed in uploads folder with strange name Ùيديووو so it can't be access through ...
0
votes
0answers
25 views

Disable drag metaboxes, create many functions using js not to work!

when i Disable dragging metaboxes in admin, it seems to make some problems. when i use this code: function disable_drag_metaboxs() { wp_deregister_script('postbox'); } add_action( 'admin_init', ...
2
votes
2answers
301 views

Loading different JS for http and https

I'm using a third party JS file. And they have both http and https version. My site have some pages loading in https while most of pages are in http. Now my question is could I do something in ...
0
votes
1answer
57 views

How would I get this to work - send to post from thick box

I have the following javascript which talks to about 6 elements. The first three open a thickbox for media upload and what not upon clicking on a specified button, the last three target the input ...
0
votes
1answer
31 views

JS files landing on page but not working, using childtheme of twentyeleven

my functions.php from child theme, does not seem to allow the script to run in the page, it works on the styles using @import url. do I need to do something like that with the Javascript or is there ...
0
votes
1answer
38 views

TinyMCE Javascript URL Question

ed.windowManager.open({ file : url + '/shortcode_generator_popup.php', I would like to move this file one folder above the current one that it's in. I'm wondering how I can rewrite ...
0
votes
1answer
214 views

Make tinymce button have a checkbox that returns a value, instead of true/false

from my understanding the checkbox of the tinymce buttons only return true or false? Is there a way to get a checkbox list? And all the item's values inside the checkbox list that are checked will ...
0
votes
1answer
84 views

Why are some custom javascript files working but some are not

I added some custom javascript files to my wordpress page. I put them in the funcstions.php like this: wp_register_script('formfunctions', get_template_directory_uri() . '/js/formfunctions.js', ...
0
votes
2answers
360 views

Trying to get single posts to load on the front page via ajax

I posted a similar question about this before but I changed a bit of the code so I figured I'd start a new topic. Below is the setup I currently have to load single posts on the front page. This is ...
0
votes
0answers
243 views

Add title and caption to thumbnail image on mouseover

I'm trying to add a simple mouseover image to display the images title and caption data. I've added the js in my scripts file which is being called okay yet the rollover is not working. Essentially I ...
0
votes
0answers
46 views

I'm doing this single page website the right way?

I'm making a single page web site using WordPress and I want to know if I'm in the right direction, and if this is the best way do it. First I'll show how the website is structured, it has 4 pages: ...
0
votes
1answer
342 views

How to make Isotope and Wordpress work together?

I am trying to make my Wordpress theme using Isotope plugin. http://isotope.metafizzy.co/ So far, I have such a result after doing that was suggested: I believe that Isotope Masonry should not ...
0
votes
1answer
166 views

AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0

For years I've set up php ajax calls and responses in my plugins like the following, with js error detection conditions as needed like... if( "<e>" == msg.substr(0, 3) ) { do_something(); } ...
0
votes
0answers
89 views

how to pass variable of shortcode of wp to javascript

I have create a shortcode of google map in my theme. whole code is below. function google_map_view_scripts() { wp_enqueue_script( 'googlemap', get_template_directory_uri() . ...
5
votes
1answer
325 views

Custom “Uploads” Dir: “Edit Image” in Media Library broken

Directory Structure I have customized my (local) install (dev box). The current directory structure is: ./root |- wp (WordPress Core root) \ |- wp-config.php |- wp-content (Content and ...
0
votes
1answer
2k views

Loading posts via AJAX in a hidden div with updated URL?

I'm using the code below to asynchronously load posts on the same index page via AJAX. I would like to be able to update the URL as well but am unsure how I can go about adding that to what I ...
1
vote
0answers
27 views

Limit filetype and wp media

This is my input markup: <div class="button-primary" id="fileToUpload">Upload</div> This is js: jQuery( '#fileToUpload' ).click( function() { var custom_uploader = wp.media ({ ...
0
votes
1answer
64 views

Display a div when post has a certain tag

I'm currently developing a wordpress blog site but I think this question maybe a bit of JS magic at the same time so put it here rather than Wordpress Development. I'm looking to create a post and ...