A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
2answers
136 views

Using javascript on my site to create nested tabs

Side note: I've been designing in wordpress for only a few months, and don't know where else or how else to ask this, so my language may seem somewhat inaccurate. I'm using the Jupiter theme within ...
2
votes
1answer
127 views

Create a separate JS application for an individual post?

Automattic is building a React.js based theme called Picard. All the JS code is in picard.js, which you can see a reference to below. Although WordPress doesn't have a "router" per se (as explained ...
0
votes
0answers
110 views

How to display a featured image and register a tag for the RSS feed?

I am trying to modify my RSS feed to display featured photos while using Angular JS to display this content on another website. I am currently using the Google Feed API to manage the format of the ...
0
votes
0answers
32 views

How to link images to a certain property type

I've build a web page, in which an user certain data; the user can add also images, and once everything is done, he/she clicks submit and a Property post type is added. The problem is that the images ...
0
votes
0answers
31 views

Checking if text from product 2 is equal to product 1

I am using Woocommerce product addons to allow users to upload a pdf file when ordering 2 products. I would like the following logic to be applied when both items are in the cart. If filename ...
0
votes
1answer
48 views

Display images from JS?

How can I get images from JavaScript? Code is given below: $(window).ready(function() { 'use strict'; $.vegas('slideshow', { backgrounds:[ { ...
0
votes
0answers
22 views

Passing variables to JavaScript from multiple hooks

I use inside the hook 'wp_enqueue_scripts' the following code to deliver home_url() value to some javascript function in the module with handle 'rdhil_read_write_css'. It was fine and the javascript ...
3
votes
2answers
170 views

Trigger JS when featured image upload window is opened in admin

I'm trying to hook up some JS so that when the featured image upload box is opened and an image selected I can use Vibrant.js to analyse the colours of the selected image. The hurdle I've encountered ...
0
votes
1answer
38 views

How to stop javascript code being broken when going into visual editor

so I already had to make my code uglier than it needed to be, because whenever I tried to do && wordpress decided I wanted &amp, and now I am finding that when I go into visual view any ...
0
votes
0answers
58 views

How to use shortcode in Javascript?

I wrote a script that adds current user name to my button URL. To get current user, I use a plugin. When I use shortcode of plugin, [currentuser_username], then it displays the current user name. So I ...
0
votes
1answer
155 views

How to set the cursor to “wait” while page is loading?

I have a few pages that take a long time to load. How can I have the cursor display the hourglass or wait cursor while loading, then revert to the initial cursor? Thanks, e
-2
votes
1answer
47 views

How can I include properly javascript files in my wp plugin [duplicate]

I am creating a plugin for wordpress. And I want to know how can I include properly js in my plugin with correct path function. Thanks
0
votes
2answers
378 views

Run JavaScript validation script on form submit in plugin

I have created a small custom plugin which is just an HTML form. The HTML form is echo'd out using PHP and it includes a small JavaScript function that I want to run on submission. I cannot get it to ...
3
votes
0answers
101 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 ...
0
votes
0answers
62 views

jQuery keyup() on Visual editor

I need to trigger typing in Visual editor and to get current text from it. Is it possible? Then next line are not working: $("visual_editor_selector").keyup(function(){alert("Changed")}); ...
0
votes
0answers
83 views

Best practice for writing backend forms to interact with database

I am responsible for a Wordpress site where ingredients, recipes, allergens and similar data is inserted into the database. All the columns in the database are separate from the Wordpress database, ...
1
vote
0answers
68 views

How to create a repeatable / reusable divs in the metabox?

I have a meta box: <?php function custom_meta_box_markup() { global $post; $meta_box_text = get_post_meta( $post->ID, 'meta-box-text', true ); $meta_box_text_day = get_post_meta( ...
0
votes
0answers
16 views

In Theme Customizer, need to reference outside control values from within checkbox's value bind

This post pertains entirely to the Wordpress Customizer (Wordpress 4.3). I have the following controls: Text input "Disclaimer" Text input "Global Disclaimer" Checkbox "Enable Global Disclaimer" ...
0
votes
0answers
76 views

Wordpress and javascript frameworks

Please advice me, At first want to say I learned about web for 2 years and after that switch on wordpress which I have been learning for 2 years at least. Until know I have made 3 wordpress sites ...
0
votes
1answer
56 views

JQuery Login Dropdown not functioning in theme

Having a problem on my demo site (http://somm.icorp.net/) what I'm attempting to accomplish is when you click on the LOGIN button a drop down appears and using JQuery, it displays a login box so users ...
0
votes
1answer
222 views

Implementing a custom form in Wordpress

I'm relatively new to Wordpress development. The Environment: Wordpress installation with newest WP version and a Child Theme being used to keep things tidy. The Task: I've created a custom HTML ...
0
votes
0answers
37 views

Event fired when file attached to a post?

I am using a Plugin called Attachments which allows you to attach any number of files which each have there own defines meta data into a post. Adding new files uses the WP Media Library shown below. ...
0
votes
0answers
38 views

foundation 5 css/js won't load in wordpress

I am really stuck with some error that I find really confusing. I have my functions.php inside my custom theme folder but why is it looking for css/js inside twentyfourteen? (index):101 GET ...
1
vote
1answer
108 views

JavaScript, best way to use data from the loop

I am trying to learn WP theme development. And at the moment I am trying to figure out how to use data from the loop in JavaScript. Lets say I got some JavaScripts functions in a external script-file ...
0
votes
1answer
69 views

print script on wordpress header after user registered

I should attach javascript snipet after user is registered on my wordpress site, i user the user_register hook like this do_action('user_register', $user_id ); add_action('user_register', ...
0
votes
0answers
35 views

How to integrate this skill simulator in a page?

So here , I would like to reproduce this page, especially the simulator in center. The administrator of this site shared a zip file containing multiple files : two files with the images , 2 HTML ...
0
votes
0answers
140 views

“window.send_to_editor” only called in Wordpress thickbox/media-uploader if “insert into post” is clicked, not “save” button

I am using WordPress's media uploader by using the javascript: function handleMediaUpload(button) { //Enables returning the URL to input window.send_to_editor = function(html) { ...
0
votes
1answer
93 views

Custom Javascript not working? [closed]

Basically I want the effect to look as it does here But mine won't do the effect I currently have a button but it won't activate the effect for the menu to pop open. site that I'm using to test it ...
0
votes
0answers
44 views

How to run onclick in text editor? (Follow-up question)

This is a follow up question from How to wp_enqueue_script with html? I have html tags with onclick. I place it on a page, but the divs with onlick are not properly working. How to fix this? Here's ...
6
votes
1answer
271 views

Keyboard shortcut for updating a page or post?

What is the keyboard shortcut key for updating a page or post? It could save me a lot of time as rolling down a page draft is time consuming.
0
votes
0answers
115 views

Toggle Visibility of Separate Javascript Files on Same Wordpress Page

Let me preface by saying my knowledge of JS is lacking at best and the concept of installing/loading/enqueueing a function on one area of the site and then calling that function in another area of the ...
0
votes
1answer
194 views

Enqueueing a script and a style sheet not working

I am trying to enqueue both a child theme style sheet and a child theme script. I need to enqueue the script because I put CDN links in there for Bootstrap. I know my enqueue isn't working correctly ...
1
vote
1answer
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 ...
0
votes
0answers
121 views

openbtn.addEventListener is not a function?

Someone has helped me with this script in Codepen where it worked fine, until i tried to implement it into my Wordpress website. The two sets of grey dots are buttons. Each button will open it's own ...
0
votes
1answer
40 views

How to get this jQuary script working?

I've searched for it, but I just getting more confused. I want to use this script to show a menubar after scrolling down 200px: ...
0
votes
0answers
114 views

After wordpress widget save (ajax call) tinymce editor gone, data not saved

I have made tinymce editor for textarea fields in widgets. I'm enquing scripts: wp_enqueue_script('tinymce', home_url() . '/wp-includes/js/tinymce/tinymce.min.js'); wp_enqueue_script('tiny', ...
0
votes
0answers
37 views

WordPress Caching

I try something on my local machine. I have a custom JS and CSS file which I included in the functions.php of my theme (twenty fifteen) like this: function load_my_stuff() { wp_enqueue_script( ...
0
votes
2answers
181 views

Show/Hide Div for Login Mask

I've been trying around a lot to get this working, however every method I tried just didn't want to do as I wanted it to. So here I am. I have a login-Mask that's only visible if the user is not ...
0
votes
0answers
38 views

I want to invoke a javascript function after shortcode

I created a shortcode that loads 6 posts in a custom design with a filter. But i'm getting a JS error because its looking for a dom elements that don't exist yet: jQuery(document).ready(function(){ ...
0
votes
0answers
42 views

Create multiple Instances of Ajax function and Control Variables from Template file

I received some help previously in order to build a Wordpress Ajax Load more function, However the site I am building is using different variances of this on different pages pages. The issue I'm ...
0
votes
1answer
36 views

Unserialize WP_Options options programatically?

I need to programatically unserialize the wp_options options. I'm creating a Java App to change database information, such as some options on wp_options, so that I won't need to access the panel to do ...
0
votes
1answer
62 views

how to prevent all css and javascripts files from loading

I'm looking for a way to prevent all css and js files from being loaded (default theme and plugins). Is there any way to do that? at least reach to minumim file load... .
0
votes
0answers
31 views

how to include js in widget?

I know about wp_enqueue_script. i just wanted to make sure that it applies here. I built a custom widget that uses a lot of js. Most of that js is included in a separate file that gets included from a ...
0
votes
0answers
65 views

Flexslider + Tabs + WP default query script issues

I'm having some issues with flexslider and tabs to work together. Example 1 - if i add google cdn to header above all works fine. Now the thing is, i know it's not a proper way of adding jquery ...
1
vote
1answer
177 views

Javascript not working?

2 days ago my javascript was located in my footer folder running correctly, until suddenly it stopped working. I was lazy to do the proper way of enqueueing, so I officially did that to see if it ...
0
votes
1answer
78 views

get_header() in backend - but keep JavaScript and CSS files

I replaced the header and footer in the backend with those from the frontend by the following code: /* add header to backend */ function header_backend() { get_header(); } ...
1
vote
2answers
142 views

Click loads template via ajax

I'm trying to load a template via ajax if the user clicks on a button. This is the code I'm using: On functions.php: function phantom_scripts() { global $child_dir; /* Ajax Requests */ ...
0
votes
1answer
118 views

Jquery in Child Theme

I am new to Wordpress and I need help with integrating my own jquery into a child theme. I have this jquery tooltip which works but I want to include it into my wordpress child theme. Have a look ...
1
vote
1answer
523 views

How do you filter the list of states when country is selected? [closed]

Seeing as there is no StackExchange site (or any other forum, that I can tell) made for WooCommerce questions, I'll run the risk of being shot down for being "off-topic". I need to add a third ...
0
votes
2answers
71 views

Best use adding user generated JS/CSS to a theme with a plugin

I want to know the best use of adding custom JS/CSS to a theme. I have built a small plugin which has a section to allow users to add CSS/JS to their theme. Now I am trying to figure out is which is ...