A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
2answers
355 views

Stop loading more posts if none left AJAX

I'm using the following JavaScript to load more pages in #work_items (see live at http://mtthwbsh.com): jQuery(document).ready(function($){ $('.older a').live('click', function(e) { ...
1
vote
1answer
265 views

How to get this JavaScript working with get_permalink

I am pretty new to this awesome forum, therefore not sure if this question below belongs here. A little JavaScript, which works perfect when I drop a static url in it but I can't figure out how to do ...
0
votes
1answer
51 views

Unable to remove meta box from custom post for all non admin users

i am unable to remove plugin meta box from custom post for all non admin users. Here is the function of the plugin : function PreparePostPageOptions() { global $WishListMemberInstance; ...
1
vote
1answer
810 views

Create Image Uploader for Widget

I found this post// Use Media upload in custom widget on wordpress 3.5 I'm not experienced in any of this so I pretty much just copied the code he provided into my own functions.php file. I uploaded ...
0
votes
0answers
89 views

Masonry and infinite scroll child theme

I have a question about masonry and infinite scroll plugin by Jetpack. I've added in my function.php file this code: function mason_script() { wp_enqueue_script( 'jquery-masonry' );} add_action( ...
0
votes
0answers
145 views

Infinite scroll not working with Masonry

I've got masonry working, like so: $('.content').imagesLoaded( function() { $('.wrapper, .content').fadeIn(600); $('.index-page .content').masonry({ itemSelector: '.post', ...
0
votes
1answer
66 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
141 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
104 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
885 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
47 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
14 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
69 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
126 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
218 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
2answers
171 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
265 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
254 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
108 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
159 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
45 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
158 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
585 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
110 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
74 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
77 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
20 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
122 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
86 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
73 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
237 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
1k 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
52 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
27 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
85 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
89 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
95 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
77 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
138 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
74 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
138 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
30 views

form to generate url

i have a form on my site to generate url and it works good but the user should wait until the whole page is loaded to be able to use it properly , i think that happens because i use window.onload and ...
0
votes
0answers
65 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 ...
0
votes
0answers
51 views

Javascript not displaying inside post

Hi I'm trying to add a video that uses javascript inside my post within the editor. I always enter it within the HTML editor with the post and have tried several different plugins but with no luck. ...
1
vote
1answer
220 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
220 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
2k 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
69 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 ...