A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
1answer
36 views

How to open the add media dialogue it in a certain state / tab?

I created a customized wp_view similar to embed (see wp-includes/js/mce-view.js, l. 868). I also have my own tab in the "add media" dialog. Naturally I want the edit button of my wp_view opening the ...
1
vote
2answers
17 views

Javascript that will execute on only child pages of a specific parent

Semi-new to WordPress, so apologies is this is an obvious question! I'm trying to execute some JavaScript on a WordPress site, but only on the child pages of a specific parent page - so, I have ...
1
vote
1answer
27 views

wp_register_script(… $in_footer = true) not working

I'd like to load some javascript files in my footer. I tried to accomplish it in functions.php like so: function my_init() { // LOAD JQUERY wp_deregister_script('jquery'); ...
0
votes
1answer
472 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
13 views

Replace email address for Adwords visitors?

I have set up adwords website call conversions so that any time a visitor comes from AdWords, a call tracking number is displayed instead of the default number. This helps track which calls where a ...
5
votes
1answer
119 views

Tinymce - How to hook before or after live shortcodes rendering?

When the edit post page loads in WordPress admin, I launch a js process which alters the TinyMCE editor’s contents. Recently I've come across the WordPress live shortcode previews which break my ...
1
vote
2answers
622 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
19 views

“JQMIGRATE: Migrate is Installed” How do I find the problem code?

I have a site and since updating to 4.5 it has a very subtle display bug that seems jQuery related (full bleed images have a white border that snaps away into correctness when you resize window). ...
0
votes
1answer
3k 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
0answers
19 views

Can't get to work with Ajax and Modal Bootstrap

I'm working on a website that shows a list of products, and when each product is clicked a Modal window should appear, with some product info. So I have 3 files: main, header-main and product-info. I ...
0
votes
1answer
470 views

How to insert HTML/CSS/JS into my iframe plugin?

I currently have an iframe plugin that displays on a WordPress page by shortcode. Currently I have been displaying websites in my iframes "src" but I recently came across an issue to display my very ...
0
votes
1answer
793 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
0answers
11 views

Highlighting HTML code entered in the text editor

I have a need to have both "rendered" html in a post and "raw" or highlighted html in a Wordpress 4.5.2 post or page. I have solved the former by simply editing in the text editor, placing my code in ...
0
votes
0answers
10 views

Managing advertising code snippets

I'm looking for a solution to manage a mix of advertising code snippets. Lets say you have three advertising contracts. adService1, adService2, adService3 each of them will have some code in the ...
3
votes
1answer
917 views

Javascript WP Object Documentation?

I was working on implementing the media library within one of my plugins/themes. I found a nice tutorial (http://mikejolley.com/2012/12/using-the-new-wordpress-3-5-media-uploader-in-plugins/) that ...
0
votes
1answer
1k views

Dropdown parent link not working in mobile

I'm working on WordPress with Bootstrap. The WP Menu dropdown parent link is not working on a mobile device. Here is the JavaSript: <script> jQuery(function ($) { $('.navbar ...
1
vote
1answer
16 views

How to create popup same as wordpress popup feature

I wants to include a popup window which is same like wordpress popup. Like if we click on the wordpress editor's link button it will open a popup window. I wants to create same like that.
0
votes
0answers
18 views

Adding Angular JS code snippets to pages?

I need to create a post type where an editor can insert 2 code blocks: one for "live" Angular JS HTML markup, and one for a pretty-printed sample of the code (which may or may not be the same code). ...
1
vote
2answers
1k views

How to add JavaScript file using wp_enqueue_scripts?

I have made a very simple JavaScript script. There is 1 .js file with a lot of code, and in the HTML file there is only 2 lines. The script works fine when I test it on a plain HTML page, but when I ...
-1
votes
0answers
19 views

Zoom product in WooCommerce site is cropped into small size and is shown in a corner

I am working on a WooCommerce site, I uploaded product images on localhost and are working fine. Now when I set the site to live server, I am facing an issue that when I upload a new product, the ...
0
votes
0answers
23 views

Auto expire page that contains specific text

Sorry, I'm relatively new to Wordpress. Is there a function or script that can automatically expire a page that contains specific text? I am using an RSS feed to display some content on a page (not ...
0
votes
1answer
19 views

Calling PHP Titles inside Javascript Markup

I have a video gallery, and all the titles are generated by php. They are coming from my Wordpress media library's attachment titles. The lightbox for these videos, however, is customized in ...
0
votes
1answer
2k 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
1k views

How to use WP switchEditors.switchto(this) JS function in your own script?

I have a tab switching theme that lets the user choose 3 editing modes when adding new pages (HTML and Visual- these are WP defaults and the new Syntax mode using Code Mirror). I have issues when ...
1
vote
0answers
13 views

Script won't execute in the media manager

I'm trying to execute a jquery script on the click of a button in a custom tab of the media manager, but it does not seem to work. I have been told this might be due to the button not being loaded ...
1
vote
2answers
1k views

Is there a way to enable Cross-Origin Resource Sharing for WordPress' ajaxurl?

WordPress already has a default URL for jQuery-WordPress application calls and it's well known as the ajaxurl. However, there are cases wherein one would need to enable Cross-Origin Resource Sharing ...
3
votes
1answer
482 views

WP3.5 Media Uploader - how to make it accept multiple images?

I'm wondering how to make WP3.5 media uploader return 2 or more items in attachement? It always runs once even if 2 items are selected. The code: $('.button').on('click', function(){ var ...
0
votes
0answers
21 views

Export multiple posts content populated with ACF to PDF

First of all, I have installed IssueM and ACF Pro and some other plugins like Wordfence, etc. I also populate the content of the post using NVD3 to produce some graphs. I need to export to PDF a ...
0
votes
1answer
31 views

TypeError: $ is not a function Error using parallax effect in Wordpress Template [duplicate]

I`m trying to include a parallax Effect into one of my cutsom page templates. The js function is returning the following error in the firebug console: TypeError: $ is not a function The error is on ...
-5
votes
1answer
50 views

Exclude script from running on certain pages [duplicate]

I would like to exclude a script from running on certain pages, Please can you tell me the best way to do this? Example: I do not want the script to run on page-id-9, page-id-11, but I want the ...
1
vote
0answers
17 views

Detecting Wordpress Customizer Panel

Recently started developing a Wordpress theme relying heavily on the customizer API. One thing I'm stuck with is detecting when a specific panel has been clicked or opened. Regular old "on click" ...
0
votes
1answer
490 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
35 views

How to include JavaScript script only on specific page [duplicate]

I am creating my own widget. I need to use custom css and js files. I have used wp_register_style`wp_enqueue_styleandwp_register_script\wp_enqueue_script` functions in order to register custom styles ...
1
vote
3answers
1k views

Load plugin JS in footer

I am trying to load JS files in my theme's to footer.All my custom JS files are being added to WordPress using wp_enqueue_script, but i am unable to find any way which will help me to load them in ...
0
votes
1answer
16 views

How to toggle custom WP archive list

Help! I'm trying to toggle the "SideDish Archive" list in the right-hand sidebar of this page – http://my-table.com/sidedish/. I don't know really anything about javascript. Small company, small ...
0
votes
1answer
3k 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
2answers
1k 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
2answers
472 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 ...
0
votes
2answers
21 views

Javascript not working on index.php but it is working on single post's page

I am trying to use mathJax in my wordpress. According to the documentation at mathjax, the mathjax script url needs to mentioned in headers.php. Which is exactly what I did. And right now this is what ...
1
vote
2answers
3k views

Ajax not firing properly using Firefox, but works in Chrome

I'm working on a plugin that seems to be fine in Chrome, but is not firing the PHP script via Ajax in Firefox. It is driving me to distraction. Here are the code blocks that relate to it. First, the ...
0
votes
0answers
17 views

Widget save brake jQuery [duplicate]

I have created a plugin that creates a widget. On the widget form i am using jquery functions that i load using wp_enqueue_script. When adding the widget on a sidebar, everything works. Then when i ...
0
votes
1answer
704 views

Load php function with AJAX on modal window

On a movie information wordpress theme i am developing, i have an href with text "watch trailer" on each cover of all movies. This brings a modal window, and that is working already, but i want to ...
0
votes
0answers
14 views

Multi-step Frontend Filtering to Reveal Content

I'm not even really sure the best and easiest way to go about doing this - or what the right verbiage is to properly describe what I'm wanting to do. On my site I'm looking to change this selection ...
0
votes
1answer
1k 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: ...
-1
votes
1answer
28 views

jQuery append only works if I select html in admin section [closed]

The following jQuery code works as expected, in that it inserts the specified html after the closing tag. $( "html" ).append( "<div id='bf_rsvp_note_display'></div>" ); However, that's ...
0
votes
0answers
29 views

Angular js template to wordpress theme conversion

Hi all currently i am working for angular template conversion to a wordpress custom theme development, I can able to fetch the post data, I am bit get stag with getting our menu's as dynamic. Here is ...
1
vote
3answers
465 views

Import HTML code that loads css and javascript into specific page

How can I add the following HTML code into one of my web pages? It's a web form that relies on css and a few java script. Below is the raw HTML code. <head> <link href="css/style.css" ...
1
vote
0answers
15 views

wp attempt focus, disabling without touching core

So i've added an extra field to the login form. I have used js to place it at the top. However, whatever I do I don't seem to be able to change the tabindex(or start focus for that matter. Is there a ...
1
vote
1answer
27 views

wp_enqueue_media() Will not load JS on the theme

I've added wp_enqueue_media() to a specific page (before including the header) on my custom theme but it flat out will not any of the JS on the page. I've already done the basic troubleshooting: ...
1
vote
1answer
460 views

How to disable specific plugin in mobile version?

I am using wp-cufon plugin , to enable cufon on my site . But I do not want cufon in mobile version . If there is any way to disable that plugin in mobile version or in just disable specific java ...