A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
1answer
269 views

in jquery read a multidimensional array via wp_localize_script()

From PHP I am pushing a basic array to jQuery via wp_localize_script() and then using the array data in my script file. Now I have extended the array into a multidimensional array and can not figure ...
0
votes
1answer
200 views

loading a javascript on a WP PAGE

so im trying to do this http://jsfiddle.net/2XV7w/5/ on my custom_page on wordpress. this is a conditional html form. It will display a specific <div> when i choose a specific drop-down value. ...
0
votes
2answers
191 views

creating a static HTML/JS/PHP page

i need to create a static page that allows me to code HTML/JS/PHP that connects to a separate MYSQL backend. how can i achieve such in wordpress page?
0
votes
0answers
96 views

Advice on loading iframes in a custom post class

So I wrote this custom post type that works as it should. The post type consist of a table of titles, when the heading is clicked a twitter bootstrap modal is loaded. Now I realized that I need to add ...
1
vote
2answers
510 views

Run shortcode at certain resolution

I've gone a roundabout way of trying to ask a question about this here: Loading shortcode with ajax but figured it might be worth asking the fundamental question of what I am trying to do without ...
1
vote
0answers
149 views

Fancybox type popup window that's not an iframe

I'm a bit stuck and need some help to get me going in the right direction. I'm trying to do something similar to the lightbox style popup on this website: http://cargocollective.com/montessori I ...
0
votes
0answers
118 views

BuddyPress AJAX doesn't work despite buddypress.js enqueued and ajax calls being made

I have BuddyPress 1.8 and WordPress 3.5.2, along with bbPress and many other plugins Since BuddyPress switched to a new template handling system from 1.7, there was no longer need for BuddyPress ...
0
votes
1answer
240 views

Javascript/jquery loads super slow (around 6 seconds) which affects only homepage

I got a custom wordpress theme from a developer but he isn't responding to me anymore. Basically my homepage takes ages to load which causes all the elements on the homepage not function until the ...
0
votes
1answer
280 views

JS this.href not getting link from menu item

I have a script to fade in and out the page container when a link is clicked in the nav. I have attached the script to the .menu-item class to target just wordpress menu links. The script itself seems ...
3
votes
1answer
124 views

How to intercept already localized scripts

If a plugin uses some script (prominent example: jQuery UI Datepicker), but you're not happy with how the script renders the output, then there're two possibilities: 1. Unregister the script > Add ...
-2
votes
1answer
103 views

Use Wordpress Built In Jquery

I see that on every page Wordpress is loading in jquery, how do I go about using that jquery as it keeps telling me that it doesn't recognize $ or $noConflict(); - I'm trying to add some jquery under ...
0
votes
0answers
43 views

Display post name on homepage

On this website I'm currently developing, I've got a post changer on the homepage (example: songhype.com), what basically happens is Wordpress checks the category for posts, pulls in the post using ...
1
vote
2answers
356 views

How to load javascript file on homepage in Wordpress in order?

I am using a quicktags plugin, which was not loading on the home page, now it does, but it does it on the wrong place. How can I solve this? I want the quicktags.min.js file to load first, rather ...
1
vote
1answer
47 views

a child theme not de-registering a patent javascript file

We're currently rolling out a number (>100) of wordpress sites where we're using a custom child theme and a holding page plugin. Most of our clients use IE8 as their browser (corporate policy) and ...
0
votes
0answers
647 views

Add jQuery Validation in Gravity Forms Form

So I have some jQuery functions that adjust my column layout on window load and window resize. They are inside a file called bp-columns.js that looks like this: jQuery(window).load(function () { ...
1
vote
3answers
402 views

How do I sanitize a javascript text?

I have a textarea that will receive a js snippet(Google Analytics). Is there a way to sanitize that? Since I cannot use functions like wp_filter_nohtml_kse(), what should I use?
0
votes
1answer
58 views

Showing Different Code on Pages With Different Layouts

I have pages and posts on a WordPress site. The pages have various layouts. Parent pages are following a 2-column (maincontent + right sidebar) layout while child pages have a one-column layout (no ...
1
vote
1answer
217 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
0answers
43 views

3.5.x Theme Customize: Handling Custom Control Requests

I am extending the WP_Customize_Image_Control as a means to include an upload-able word mark for a site. The control works just fine, but I need to do some post process handling on the image (i.e. ...
0
votes
2answers
369 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
319 views

Creating a custom wordpress widget and stopping js from running twice(once in active widget once in widget selector)?

Ok so here's the question how do i stop js from running twice on the widget.php page? I am creating a ajax loaded custom image selector from a domain on the same server as the current site. I want ...
6
votes
1answer
586 views

How to load wp_editor via AJAX

Does anyone know how o load wp_editor via AJAX in WordPress? My markup and editor is getting loaded properly but editor controls are not getting loaded properly, it may be because Javascript is not ...
0
votes
1answer
142 views

Localizing methods for jQuery append prepend wrap parent

So I am serializing some options in WordPress and then localizing them to be used in my jQuery script, however what I am trying to do next isn't working. jQuery('.advert')+ lu_ban_object.method ...
4
votes
1answer
410 views

Unable to get Preview of Uploaded image within a Custom Meta box

I first followed the steps in this tutorial. Added the Image Uploader, tried it out but I realized it's an older version of the WP Uploader... So I then found this post, and now my uploader is ...
1
vote
2answers
58 views

How do I add JavaScript that will execute on all my sites in Multisite?

We are creating an internal network of sites using MU and there are some small things we would like to have globally on all the sites without having to add them individually for each site. I would ...
1
vote
1answer
155 views

Best approach to fetch data from wp options to js file or php file

I am creating my first ever plugin, as I am not a programmer, I have been following tutorials and reading the codex, etc. My plugin consist in showing a notice to users when certain conditions are ...
0
votes
2answers
60 views

Trigger a function during onload

I recently added Javascript and CSS files into the wordpress. All the files are being registered through functions.php. One of the files is my_worldmap.js as shown below $(function() { ...
0
votes
1answer
38 views

Load custom script on a single template

So I placed two scripts in the plugin folder, but I can´t figure out why they wont load. I created a custom template where I have placed the following code: <?php function my_enqueue_scripts() { ...
2
votes
1answer
78 views

3.5 media.editor: what is the event listener for choosing an image?

What is the event listener for selecting an image in the media.editor javascript. I am attempting to add a multiple image selector to a custom plugin, and I need to show the user what images they have ...
1
vote
1answer
84 views

Can't load a class into WordPress post editor's content field

Following to THIS WordPress QUESTION we tried some tweaks and got some nice solutions, hope we can public them after some good active codes-snippets. According to our procedures, we correctly ...
1
vote
1answer
219 views

ASCII to Unicode conversion and then save the data into database using WP post editor field

Here is the WordPress default post editor as we know: You may notice, here are some garbage texts in the Title and Description field. They are ASCII texts. PLOT In Bangla, a widespread software ...
2
votes
1answer
342 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
0answers
78 views

Javascript not defined but included

I am attempting to implement a javascript function within a page. It is implemented correctly in the header and loads correctly: <?php function forceNumber2() { wp_enqueue_script( ...
2
votes
1answer
169 views

AJAX issue - Uncaught SyntaxError when processing Zip File

I'm creating an application that will allow a user to fill out a form and then have a customized zip file downloaded for them upon submit. I'm utilizing AJAX to accomplish this task. ...
0
votes
1answer
59 views

How to add 3 weeks to the_time() function

I have a WordPress blog where I need to display an image on each post only for 3 weeks. This means that after 3 weeks have passed, since each post was published, the image will disappear. First, I ...
0
votes
1answer
481 views

Javascript on Registration Page

I've been trying to figure out how to implement javascript on my registration page with no luck. I've read the documentation on wordpress about properly including js, have searched for relevant ...
0
votes
1answer
47 views

Newest version of javascript

Doing updates to my site and all the files seem to update ok, except the javascript files. I think this is to do with the version, but try as I might I can't get version numbering to work. ...
0
votes
2answers
72 views

random reason on refresh

I am editing the sidebar widgets and have added one for users who are not logged in or registered. the widget requests that users register or login and I am wanting to add a random reason (quote) as ...
0
votes
0answers
173 views

Save Changes function after table is sorted using jquery

I have a simple table, and the jquery works great for sorting. The fields drags an drops perfectly, and updates then and their. Also of course the data in the fields are saved in a array. The data in ...
0
votes
1answer
119 views

Set start page depending on screen width [closed]

I'm building a responsive theme and would like to have different start pages depending on screen width. In this case, the start page is set in WP admin and contains an image map built on a cunstom ...
0
votes
3answers
276 views

How/Where is editor.min.js Added to the wp-admin Post Page?

How/Where is the wp-admin/js/editor.min.js file added to the backend WordPress post editing page (wp-admin/post.php)? How could I change this to use the non-minified file? I'm working on a browser ...
2
votes
1answer
189 views

update_option in javascript

So there's function in wordpress to update a named option/value pair to the options database table: <?php update_option( $option, $new_value ); ?>. And what I'm trying to do implement this ...
3
votes
1answer
2k views

Ajax Load More Posts in Category Page

I am developing a theme where I need to load more posts with ajax. Currently, when I click load more on the category pages, all the posts are loading. The category.php looks like this : ` ...
0
votes
0answers
16 views

embedding php in javascript to switch out image in child theme [duplicate]

I am trying to embed a some php in my javascript to switch out images... $(document).ready(function() { $('.small-port-images a:nth-child(3)').click(function() { $('.large-port-image ...
0
votes
1answer
937 views

How to turn off automatic operation for Nivo Slider?

I am using Nivo Slider plugin to run a slideshow on my site. It automatically runs a slideshow on top of my screen. However I want the user to do this manually (clicking to advance to the next ...
1
vote
1answer
134 views

JavaScript && operator in visual editor

I am used to of adding javascript/jquery code in posts via visual editor but it seems I never used && operator cause wordpress is altering && operator in &. Here is a link where I ...
0
votes
1answer
110 views

Replacing WordPress Icons (menu,icons32, etc)?

I want to replace wordpress admin sprites. I recreated the images and looked answrs for icon replacement using jquery and simply with CSS BUT what about ones link icons32-2x.png where I can't find the ...
0
votes
1answer
25 views

Covert Wordpress Blogname into JQuery

Here is the blogname in php <?php $blog_title = get_bloginfo('name'); ?> I want to convert it to javascript. The file I want the blog name is in a .js file so I cant create the variable with ...
1
vote
1answer
62 views

Display the number of unseen comments on a page since the user last visit

The community is private and it has several pages /wordpress /design /etc . When users go to those pages the only thing they can do is to comment. Now, what I am trying to do, Idk if possible, but if ...
0
votes
0answers
19 views

Lightbox Post Pop-up on homepage [duplicate]

I've been working on sampression lite theme and what I want to achieve is when a post' thumbnail/read more link on homepage is clicked, a modal will pop-up ( similar to pinterest and this wp theme ...