A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
1answer
80 views

Should I put my plugin javascript inline?

I have a small bit of (localised) Javascript bundled with a plugin. Currently it's in a non-minified .js file, called at via enqueue_scripts. Given that this script will likely run on every page, ...
1
vote
1answer
264 views

is_page not working when loading javascript with add_action in functions.php

This code is working in my functions.php and it's loaded properly: add_action('wp_enqueue_scripts', 'js_custom', 50); function js_custom() { wp_register_script( 'js_custom', ...
0
votes
0answers
127 views

wordpress powered site's google search excerpt showing casino links

I have wordpress blog i just checked Google search result of my site, they are showing excerpt containing text like below "best site should try out for demo mode of gaming variants to adopt good ...
0
votes
1answer
1k 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 ...
0
votes
0answers
50 views

exec JavaScript using add_action when publish_post

How can I execute some Javascript code when an user publish a post I want to do something like this before publish a post: add_action ( 'publish_post', 'custom_links' ); function custom_links() { ...
0
votes
0answers
16 views

Show only items from user_role in code

I need add this code to this code http://itweb.sk/script.txt $user = new WP_User( $item->post_author ); if ( !user_can($user->ID,'directory_4') ) { echo "hello"; ...
0
votes
1answer
1k 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
80 views

Open media popup to specific tab

The project I'm working on right now uses the wp brightcove plugin and has it added to the media popup window as a separate tab. I've been asked to make it so when someone clicks a video button (which ...
0
votes
1answer
186 views

How to integrate a different (JavaScript) editor in WordPress?

I'been using WordPress since 2005 and although I'm pretty much conquered in all respects, I still wonder how some possibilities are not there for the user. One of them: changing the default TinyMCE ...
0
votes
0answers
27 views

how to disable inner links in wordpress

i have used jquery accordion menu plugin for site navigation in my wordpress website. in that i like to disable secondary level links for specific main links. i have disabled third level links by ...
0
votes
1answer
340 views

Execution of JavaScript on save post

I got stuck with one problem, can somebody please help.. :) I would like to execute custom JavaScript function before post is saved, and i can't find how to do that. Something like JavaScript version ...
4
votes
3answers
188 views

How to echo JS right after enqueued script to put it into noConflict mode?

I want to include and use third party JavaScript file (Bootstrap Tooltip) in my plugin. Since Bootstrap is highly popular framework and tooltip() is rather generic name I want to make use of included ...
4
votes
4answers
358 views

Include jQuery UI as a whole

Is it possible to include jQuery UI as a whole instead of: wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-effects-core'); // a lot of other jquery ui imports.... I've searched in ...
-1
votes
2answers
331 views

Ensure an external javascript file called from plugin is loaded after jquery is called

I am calling a javascript file from my wordpress plugin code using: add_action('init','gallery_sugar_js_init'); function gallery_sugar_js_init() { wp_enqueue_script( 'gallery_sugar_js', ...
0
votes
1answer
113 views

Trying to fix multiple category drop down

I'm having some problems trying to fix my category drop down on the website i'm developing. Basically one drop down filters has "Sort by Location" and the second one is "Sort by Price" The first one ...
0
votes
1answer
208 views

Creating multiple category drop down

I'm trying to figure out on how to create a multiple category drop down to filter different types of post Here is an image of my work in progress ...
0
votes
0answers
48 views

Trying to customize wordpress drop down categories

I'm having some problems on how to display the categories that i want in wp_dropdown_categories. Here is an image of the drop down - Here is the code for the dropdown - HTML: <?php ...
0
votes
1answer
405 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
2answers
1k views

How to Add a .js file Only in one specific Page Dynamically to Head

I need to add some scrips for Google Maps only in my contact page and I do not want to populate it on all pages. I am not willing to create a custom header as well so I was thinking is there any way ...
0
votes
0answers
153 views

JS enqueue path (localhost)

Im trying to load the flexslider.ls file in the footer of frontpage, it just loaded Jquery only, without flexsilder.js I tried through full path // Load the Theme JS function theme_js() { ...
1
vote
1answer
92 views

Enqueue Wordpress plugin scripts below all other JS

I am developing a simple Wordpress app but I am having an issue as all of the plugin scripts are rendered before those which are enqueued in my functions.php. Here is a sample section of the ...
0
votes
1answer
98 views

Theme customizer live preview JS- Trying to bind to an html image url without luck

I am having a little trouble binding the theme customizer live preview javascript to an HTML <img src>- more specifically it is my logo. Here how the html looks on the page(which is fine and ...
0
votes
0answers
28 views

Javascript notification banners not showing

i’m having problems debugging a problem that i think a theme is causing…i’ve managed to narrow it down to a problem with the theme by deactivating the theme and the bugs not there – hence I’ve ...
0
votes
0answers
134 views

I want to edit an AJAX Wordpress Pagination

I am using this code to be able to load my content using Ajax (loading content without refreshing the page). The code I found fades out the content and fades in the new content. I want to add the ...
0
votes
0answers
116 views

Pre-selecting category from drop-down list or convertingdrop down list to links

I'm using this plugin called buddypress links and in it's link directory page the user can sort through the links by category from a drop down list(screenshot).What I need is seperate links for each ...
0
votes
0answers
95 views

Saving data when javascript state changes

how to save data using ajax in wordpress when there is a change in javascript variable's value ? Vimeo Video State Change - http://jsfiddle.net/bdougherty/HfwWY/light/ I'm trying to save the (video ...
0
votes
1answer
344 views

Remove CSS & JS files from Wordpress Main Page For Increase Pagespeed?

With the reference of http://stackoverflow.com/questions/12463304/wordpress-load-plugin-css-js-in-functions-php-w-conditional-tags answered by @maiorano84 i am using cforms, FancyBox, WP Page ...
0
votes
1answer
3k views

Using wp_ajax and wp_ajax_nopriv hooks

I want to send an ajax request and want to process it if the user is logged in. Therefore I want to use following two hooks, but I am not sure if I am using them correctly. Is it correct to use same ...
0
votes
0answers
58 views

Load and execute javascript from body

I am trying to have the following code posted in the body (from the admin interface) <div class="zx_ABCD zx_mediaslot"> <script type="text/javascript"> window._zx ...
1
vote
1answer
33 views

How to get the post_name when in preview?

I'm using the below code in my functions.php file to include some JS only in posts I want. The code works fine for published posts and I can target a specific post, but how do I do it for posts that ...
1
vote
1answer
100 views

What's the most efficient way to include this javascript in only a single post?

I'm trying to insert Highcharts JS into one of my blog posts. Inserting the code into the text view didn't work and seemed messy anyway. I've also tried using wp_register_script() and ...
0
votes
2answers
107 views

Clear custom field when new tag is added

When adding a new tag in the admin interface, WordPress doesn't reload the page. It appears to send the data with an ajax call, clear the fields and add the tag to the list on the right. I am working ...
-1
votes
1answer
99 views

Javascript Loading Effect to URLs

I have found the youtube loading effect which I want to use in my wordpress theme. As this demo shows the effect triggering with button event. I want to add this to my wordpress theme by triggering ...
0
votes
1answer
130 views

Disable / Deregister all JS from all plugins

How can i disable all js files from plugins and load one single js file which i have combined and compressed ? Is there any way ?
0
votes
0answers
153 views

How do i keep my current page menu highlighted on pagination?

I have a navigation menu in a page that highlights the current menu you’re on based on the URL by adding a class. My problem is that my page is paginated, so sometimes the user will end up at: ...
1
vote
1answer
77 views

JQuery not working in my plugin [closed]

This is my first time using JQuery in a WordPress plugin, and I'm having some trouble. Here is my "main" plugin document: <?php /* Plugin Name: Dump-It Scheduler Plugin URI: ...
2
votes
2answers
176 views

js Conflict in admin panel - I guess it's from the core WP installation

A client's site: causing serious js conflict or js loading disabilities, is under custody. Activating DEBUG, Deactivating all Plugins, and Activating Default theme "T13" found that, still the problem ...
0
votes
0answers
84 views

Adding SSL verification seal javascript from Thawte breaks website

We are trying to add Thawte SSL seal javascript to our website, but it keeps everything else from loading if added to a normal text widget. For example, if we add it to where the Thawte SSL image link ...
1
vote
1answer
277 views

How to run a external JavaScript file on wp-admin if admin, and other if normal user?

I'm new to WordPress plugins, and I'm trying to load a external JS/jQuery file with some scripts I need. It needs to run in the wp-admin page (not just once when activated). There is a JS file for a ...
0
votes
3answers
271 views

Unable to run jQuery script in my template file

I really want to run a simple code in my template file. E.g. if I put somethign like this in my page.php: <script type="text/javascript"> jQuery(document).ready(function($) { ...
0
votes
2answers
3k views

Using TinyMce with textareas in meta boxes on custom post types

I am trying to use the http://www.tinymce.com/ plugin to add a tinymce to my textareas in my meta boxes I have created. I've googled other ways and either I cant get it to work or didnt grasp the ...
0
votes
1answer
80 views

How do I include javascript/jquery image resizing with wordpress?

I wan't to include this script in my wordpress theme, making it resize all of the images inside posts according to the current window height: https://github.com/gutierrezalex/photo-resize I've made ...
0
votes
1answer
2k 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 ...
1
vote
1answer
133 views

Where to call wp_enqueue_script in a plugin with custom template?

I am writing my first plugin and I have this code in the main plugin php to replace home page with custom template add_filter( 'template_include', 'replace_home_page' ); function replace_home_page( ...
0
votes
1answer
164 views

Using admin-ajax prevents regular php form submission

I have a page with a table of posts and groups of checkbox filters in the sidebar. Looks something like this: www.example.com/toylist |___________| |_______________________| | [ ] Red | | ...
0
votes
1answer
188 views

2nd page displaying the exact same posts as my first page (minus the very first post)

Site Links: http://manofmany.com & http://manofmany.com/page/2/ I'm seeing my 2nd page displaying the exact same posts as my first page (minus the very first/latest post). All other pages 3,4,5 ...
0
votes
1answer
23 views

how to request a script more than once in wordpress

Can I ask how I can request a script more than once in wordpress. For example: for($i = 0; $i < 2 ; $i++){ wp_enqueue_script('alerthello.js', 'example.com/example.js'); } I expect the code to ...
0
votes
0answers
82 views

Why can't I load JS script in a plugin?

I have this at the bottom of my plugin file, but while I can access the plugin, I can't see any reference in the code to jquery.chained.min.js in the source: add_action( 'wp_enqueue_scripts', ...
3
votes
1answer
1k views

wp_enqueue_script : how to change loading order of scripts?

I would like to know how to list all scripts loaded on a page, ranked by order and change this order.
0
votes
1answer
356 views

Problem after upgrade to 3.6.1

Really wishing there was a role-back feature installed. I upgraded last night, now when I open the dashboard one of the javascript modules is causing an infinite loop by including the 'Welcome to ...