A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

1
vote
1answer
226 views

How do display simple page for printing product info? [closed]

I'm using WP 3.1.2 and latest e-commerce plugin. Now I'm stuck at creating simple page for printing product info. It has to be only product information with not WordPress header and footer. The pop up ...
0
votes
1answer
43 views

On one of my sites a file is shown as 404 but the file IS there

(Cross-posted from stack overflow) I am building a WordPress plugin. The plugin works beautifully on one site. But on every other site I've tried so far one of the resource files used it getting a ...
1
vote
1answer
353 views

What is the “proper” way to generate a javascript variable depending on a custom field value?

On my site I have some posts with a custom field "Name". Now, in case the post has "Name" set, I want to generate this code: <script type='text/javascript'> var FG_DONATE_BUTTON_PARAMS = { ...
0
votes
1answer
103 views

wp_enqueue_script causes page to vanish

The goal- include my-script.js (dependant on jquery) in my WP theme. The problem- When I use this code,(in the head element of the header template file) my entire page goes blank when loaded: <?...
0
votes
1answer
117 views

Wordpress getting css and script files from client machine rather than the server machine

I'm a noob Wordpress user and I'm having an odd problem. I managed to install Wordpress edit the wp-config file and everything. However when I browse my site from a remote machine no css or script ...
3
votes
1answer
122 views

What happened to convertEntities?

I was using the javascript function convertEntities in a plugin that worked great until recently and now the function seems to have vanished under 3.3 - Is there a substitute function I should be ...
17
votes
1answer
17k views

How to add defer=“defer” tag in plugin javascripts?

I couldn't add defer tag in plugin javascripts. Google developer pagespeed test suggests me to add defer tag in contact form 7 javascripts. This is how contact form 7 includes javascript in header. ...
0
votes
1answer
840 views

AddThis Sharing Bar Not Displaying on Custom Page Template - JS conflict?

http://www.headcount.org/a-real-whodunnit-the-oil-spill-blame-game/ - on the single posts the sharing bar displays. http://www.headcount.org/blog/ - on the blog archive page it doesn't (even after ...
5
votes
1answer
3k views

Add custom shortcode button to Editor

Before the new version of Wordpress 3.0 came out I was using this jQuery code below to add custom buttons for my own shortcodes to the editor toolbar in the admin panel, it worked great. However with ...
-1
votes
1answer
772 views

How to Create a Repeatable Meta Box

I would like to know how to create repeatable meta-boxes like in this video: http://www.screenr.com/a17s [starts at around 40 seconds]. I saw an answer on how one creates a repeatable section within ...
3
votes
2answers
937 views

How to disable 3.3 Tooltips?

I find the 3.3 Tooltips annoying when I'm upgrading many live and dev sites. How do I disable them via functions.php? Unenqueue wp-includes/js/wp-pointer.js ?
8
votes
1answer
4k views

wp_enqueue_scripts, wp_register_scripts, wp_print_scripts: i'm confused

I've been reading up a bit on this subject, but the more I read - the more confused I get. Can someone explain to me in short what's the exact difference between wp_enqueue_scripts, ...
0
votes
1answer
745 views

PHP variables in a post?

I'm very new to PHP. On a Wordpress site, I want to use custom Google Maps with the Javascript API V3. Some posts will have maps in them, and I want to use PHP variables to determine the unique ...
3
votes
1answer
1k views

How to disable hoverIntent in Wordpress 3.3 admin

I don't like hoverIntent in the new flyout menus or admin bar; to me, it makes my page feel slow. What would be the Wordpress-friendly way to disable hoverIntent (or change its options) in the new ...
0
votes
1answer
546 views

how to insert a HTML form into a javascript popup?

I'm working on a plugin that generates a list of candidates as output. For each candidate there is a link (View Details) that once is clicked, a popup appears. I need to put a simple contact form into ...
0
votes
1answer
544 views

Remove Javascript generated by Comments

In a theme I am working on, the comments form (mostly sure they are both comments form) adds javascript to the header. <script type='text/javascript' src='http://[URL]wp-includes/js/l10n.js?ver=...
2
votes
1answer
979 views

How can I make the “Preview Post” button save and preview in the same window?

When you choose "Preview", which is actually a link, <a class="preview button" href="?p=52&amp;preview=true" id="post-preview" tabindex="4">Preview</a> the post is saved and the ...
0
votes
1answer
884 views

Does wp_localize_script call a Javascript Function or Simply Pass PHP Parameters to It

Easy question: I'm trying to understand wp_localize_script. Does wp_localize_script call a JavaScript function or does it simply pass PHP parameters to JavaScript? I want to pass PHP parameters to ...
0
votes
1answer
812 views

Ajax page load in wordpress the right way?

I tried something like the following but if the page I'm loading has javascript it's not running because the elements are created after page load. When the javascript is something I wrote I simply ...
1
vote
1answer
408 views

Mixing Regular Javascript With jQuery in a Plugin

Sorry for a simple question. I'm learning about plugins. I've got some javascript that I want to put in a jQuery file in my plugin. (I've got jQuery and the scripts enqueued, and working fine). ...
0
votes
1answer
222 views

how can i send this to wp_head - escape problem

how can escape this char ----> ; i ask becuse i want to use this to send some javascript to the head using wp_head this is want i want to attach to wp_head: add_action('wp_head', '...
1
vote
1answer
427 views

Question about the way that wp_register_script works

Ok so I'm using the Roots Theme for WordPress (https://github.com/retlehs/roots), which, is sort of a starter theme or theme framework. I'm confused about the way that it deregisters the WordPress ...
1
vote
1answer
232 views

Can someone please tell me what is wrong with my plugin?

Two days back a made a plugin that allows me to insert toggle box in to the post with the shortcode [toggle Title="My title"]toggle test[/toggle] I also posted my plugin on WordPress.org plugins ...
0
votes
2answers
2k views

Store JSON in a custom field

I have a drawing canvas on some of my Wordpress' post pages, where users can draw on. Upon drawing, my JS code currently sends the user's drawing to a php file. This is where I store the array in JSON ...
3
votes
4answers
33k views

jQuery UI Datepicker not working

i want to add a datepicker on a custom page but i doesn not work. WP version is 3.2.1. Those are the init string i used on wp code: wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); ...
13
votes
4answers
6k views

Solutions for generating dynamic javascript / CSS

Let's say you need to generate javascript or CSS code that depends on the current context. For example you have a form on the homepage that fires an ajax request on submit, and a different form on ...
0
votes
1answer
310 views

How to make a Post Tag primary?

We are trying to rethink how a blog is laid out, by using Tags as primary headers for each post, instead of Categories. In order to do this, we have to set a Tag for the post as Primary. So, we are ...
1
vote
4answers
2k views

HTML / Javascript in custom field textarea?

Is there a filter for allowing HTML / Javascript into a custom field textarea? I'm using get_post_meta. On the frontpage I want the HTML / Javascript to run, not to be displayed.
3
votes
2answers
680 views

How to disable admin flyout menus?

Seriously, I hate flyout menus with a passion, and now they're popping up all over the place in the admin screen. (They are particularly heinous when you use the blue admin theme, because they add a ...
0
votes
1answer
193 views

CSS/JS files in WordPress

In web development, I get used to place css/js files under separate folders (css folder, js folder ..etc). What I am experiencing in WordPress is that I cannot access these folders in WordPress Admin ...
0
votes
1answer
1k views

Using Javascript to Set Redirect Page in Contact Form 7

I have a Contact Form 7 form that needs to redirect to specific pages depending on how the user arrived at the form. I'm storing the URL they need to be redirected to using localStorage and I'm trying ...
1
vote
2answers
2k views

WordPress Jquery Fade in, Fade out effect

I'm following a tutorial. I've included the hover.js with the following code: $(function() { // OPACITY OF BUTTON SET TO 50% $(".imgopacity").css("opacity","0.5"); // ON MOUSE OVER $...
2
votes
4answers
4k views

Adding a class (arrows) to main menu links that have children?

I'm wondering if it is possible to add different classes to second/third/fourth/etc-level items that have children in Appearance > Menus tree? That's how I call the menu: <?php $menu_args = ...
0
votes
3answers
326 views

Jquery not working

(function($) { $(document).ready(function(){ /*$('body').css('position','relative'); $('body').animate({'left':'-9999px'},3000);*/ alert('hello'); }); }(jQuery)); ...
1
vote
1answer
1k views

Open div inside a custom post-type with Fancybox

I did have a similar problem with this but never managed to find a solution... I have a custom post-type with a number of pages, but what I want to do is grab a particular div from the pages and ...
0
votes
1answer
2k views

How to Run a jQuery Script after a Javascript Script has Finished in WordPress

I've got javascript (a) and jQuery script (b). I need (b) to run after (a) has finished running. I need them to run sequentially. How do I do that? In wp_enqueue_script, I've made (b) dependent on (a)...
0
votes
1answer
1k views

TinyMCE in a div / textarea on frontend?

I have a post on my frontpage and I want to add the TinyMCE editor to it and could not make it work. I've tried these guides without any luck http://stackoverflow.com/questions/2855890/add-tinymce-...
2
votes
1answer
1k views

Insert shortcode in post editor from javascript (Visual / HTML)

I want to insert a shortcode in the Wordpress Post Editor from javascript (not a tinymce plugin). I currently use: tinyMCE.activeEditor.execCommand('mceInsertContent', false, "[SHORTCODE]test[/...
0
votes
3answers
2k views

wordpress wp_enqueue_script() not working

I'm trying to add this social-network button: <a href="http://svejo.net/submit/?url=[your url]" data-url="[your url]" data-type="compact" id="svejo-button">Add in Svejo</a> ...
0
votes
1answer
1k views

wp_enqueue_script() not working

I'm trying to add this social-network button: <a href="http://svejo.net/submit/?url=[your url]" data-url="[your url]" data-type="compact" id="svejo-button">Add in Svejo</a> ...
13
votes
5answers
4k views

Can WordPress be made to support websockets?

Websockets are a cool, cutting-edge technology wrapped into HTML5. Basically, you can open a websocket to enable persistent, 2-way communication with a web server. The client (user interface) can ...
0
votes
2answers
747 views

How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?

I am looking for a solution to reuse the header and footer navigation links (with style, of course) in one of my WordPress website for several other WordPress sites. Please note that I'm trying to ...
0
votes
1answer
74 views

should i be checking for jquery before enqueing it in a plugin

At the start of a typical plugin which uses jquery I have something like the following wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/...
1
vote
1answer
2k views

jQuery Hoverintent plugin in TwentyEleven Menu [closed]

The default menu in the TwentyEleven theme is quite nice, pure CSS, but unfortunately, way too responsive and quick. It would be so nice to have it respond the same exact way with which the admin bar ...
3
votes
2answers
1k views

jQuery in header or footer

From my reading it seems there is a good case for loading scripts like jquery and dependencies into the footer as a preference if possible; however 2 things confuse me which. Firstly the default for ...
0
votes
1answer
121 views

Load Javascript for a widget Worpress

I want to load a special Javascript File just when the widget is loaded in the sidebar. Where do I have to put my wp_enqueue_script(...) lines? class controller_widget extends WP_Widget { ...
0
votes
1answer
704 views

jQuery UI Tools (Flowplayer) Issues

As great as the jQuery Tools might be they're giving me a headache. I want something like this for my website. I have the necessary script included (and Scrollable works just fine btw.): <script ...
1
vote
2answers
971 views

Google Maps and Yandex Maps doesn't work correctly

When I try to insert a map into my WordPress page, I get only a gray-colored field with some controls as shown on the picture: No matter, how I put in into the page: by using a special plugin or ...
0
votes
1answer
2k views

jQuery UI Tools: Scrollable: More than 1 instance possible?

[Found the answer (please scroll down to Edit2]: I'm trying to implement Scrollable into my theme. I ran into a few problems. I don't know much about javascript, but as people here encouraged me to ...
0
votes
2answers
3k views

Properly embed javascript into WP (using function.php) - doesn't work?

It seems that my contact form's ajax javascript and the custom.js that I'm using for my drop-down navigation are interfering with each other. The contact form's ajax fuction will only work properly ...