A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
0answers
11 views

Run script when media uploader is opened in post

I've added additional fields to attachment fields so that the user can select a photographer either from a dropdown that has a list of photographers, or you can put your own photographer. For that ...
0
votes
0answers
14 views

wordpress 4.4 upgrade visual editor bullets select for not selected elements

Please check attachment for reference image and help me to fix it please.
0
votes
0answers
18 views

How to 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 ...
0
votes
0answers
13 views

How to reference tinymce body in my script

I want to add some custom behaviour to my tinymce body, but I can't reference it in my script. this is how I load my scripts inside my wp plugin. $this->loader->add_filter( ...
0
votes
0answers
7 views

Defer or async javascript stops pingbacks and trackbacks

I'm using the following code to defer all js-files on my site but have struggle with pingbacks and trackbacks - the didn't work anymore. It seems that wordpress is using some javascript-stuff to ...
0
votes
0answers
17 views

add inline javascript like wp_add_inline_style

How can I add an inline js right after my selected enqueued file? like we can do with inline_style I want to add noconflict to an external jquery file (through cdn)
0
votes
0answers
19 views

Call/link wordpress category with jquery/isotope classes

I am working on the portfolio section of my web, and these codes i have in filter.js script (in wp-includes/js folder) jQuery(document).ready(function(){ ...
0
votes
0answers
15 views

js-methods with prefix specified

I have wordpress plugin with js-file attached for js functions. I want to escape possible error of having js functions with the same name as js functions pf other developers so I use some prefix like ...
0
votes
0answers
30 views

Isotope filtering with wordpress by categories

I am using the isotope by metafizzy script, need to use it on projects page of my website, it's working fine but what i want to do is filtering by custom post categories (portfolio categories), here's ...
0
votes
0answers
52 views

Javascript file doesn't load

I have a mysterious problem - the script file isn't loaded. The same code works on a test server. But when we uploaded it to the live server and looking at the browser console at "sources", it didn't ...
0
votes
0answers
26 views

Use data-id for wordpress posts (individually)

I get the filters script implemented on my wordpress web by some developer, who's not good in wordpress functions but he did implement the filter script on web. That script is working on projects ...
0
votes
0answers
22 views

Getting Menu Items Parameters in Javascript Loop

I'm using the Menu Image Plugin - https://wordpress.org/plugins/menu-image/ It adds a image to the menu I need to extract or output the menu items ie Name, Menu-Url, Menu-image into javascript loop, ...
0
votes
0answers
8 views

Customize navigation menu in the Twenty Fifteen theme

Is it possible to change the behavior of the navigation menu in the Twenty Fifteen theme so when a user clicks a menu item to open a submenu all the other already opened submenus are closed? I'm ...
0
votes
0answers
17 views

Detect when media select input field has been populated in a plugin

I have some code in a little plugin I am trying to make that allows a user to select an image to use : <input type="text" name="thumbnail_adr" id="thumbnail_adr" class="regular-text" ...
0
votes
0answers
15 views

How to limit each front-end user to view just his own uploaded files on Amazon S3?

In my Wordpress website Users can upload video files directly to a Amazon S3 bucket, all of them use the SAME bucket for their uploads. After the upload is done each user should be able to view/delete ...
0
votes
0answers
13 views

Wordpress Customizer - reload controls

I have several controls setup, one of which is a custom multi-select field which allows you to select several different options, based on these selected options I tailor make other sections/controls. ...
0
votes
0answers
40 views

Trying to update User Meta with Ajax

I am trying to make a plugin to record the users browser based location as user meta data stored as Latitude and Longitude. This current version is trying to make user meta via form, but ultimately I ...
0
votes
0answers
16 views

multiple_loop of filterable taxonomy_portfolio for CPT

first sorry for my "school-level" english and for possible mistakes (it's the first time on this forum) I have a CPT "corso", I have more taxonomy for this CPT (argomento1, argomento2, ...) and I've ...
0
votes
0answers
15 views

Can anybody explain why this js value is set at 10 in this media library source?

I'm using Mike Jolly's media uploader plugin on one of my Wordpress plugins which opens the media library as a shortened popup. Generally it works, but line 4 of the main code includes the following ...
0
votes
0answers
28 views

Call attributes from shortcode function to a JavaScript function?

How do I call attributes from shortcode function to a JavaScript function? extract(shortcode_atts( array( 'xyz' => '' ), $atts )); I want to call xyz's value in ...
0
votes
0answers
20 views

Accessing tags from the front end

I would like to access the tags that are assigned to a post from the front end (JS). Is there a hook / object I can tap for these?
0
votes
0answers
16 views

Widget Admin page and Javascript enqueuing

I am authoring a WP Widget plugin, and am having problems enqueuing javascript onto the Widget Admin page. The Javascript works when the page is first loaded or refreshed, but when you click "Save" on ...
0
votes
0answers
75 views

Get URL of current featured image with JS in edit post view

Is it possible, somehow, to fetch the URL of the currently set featured image when you're in the edit post view? So far I've looked at fetching via jQuery such as: var url = ...
0
votes
0answers
20 views

Should I be worried about this error when enqueueing an external JS file? Everything still works

I enqueued a JS file that contains the below code. I can tell that the JS file is working correctly and being used. However, the browser console gives me an error Uncaught SyntaxError: Unexpected ...
0
votes
0answers
26 views

video preroll vimeo in wordpress

Hello guys I would like to integrate an open source code taken from github to my wordpress theme. link: Vimeo Pre-roll This is the code of my video.php, I would like to work with vimeo. code: ...
0
votes
0answers
35 views

WP API Get Request Dynamically Load the_content

I have formatted my posts as follows, using the normal Loop: the_title the_date the_excerpt Using a "Read More" button onclick and the WP API v2 JSON data, how can I dynamically expand the post to ...
0
votes
0answers
52 views

Adding number of items in cart at the beginning of the <title> tag using Javascript

I'm working on a WooCommerce site and I'm trying to add the number of items in the cart, inside of the <title> tag. The thing is: I've been looking for all over the place where the ...
0
votes
0answers
33 views

Change view and refresh wp.media

I'm building a plugin which adds a new media tab. In this tab i display an iframe in which i can select images from another source and upload them to wordpress (using ajax). This works just fine, the ...
0
votes
0answers
17 views

Protect my plugins document ready JS from errors from other plugins

I'm creating a plugin where I add some event listeners etc. Nothing fancy. I'm using the document ready event and it's working fine. The only problem is, that other plugins may cause JS errors into ...
0
votes
0answers
53 views

Making a custom widget that includes a tinymce and works in Site Origin Page Builder

For a client I'm using Site Origins Page Builder plugin. It enables the client to make rich layouts for each page by dragging and dropping widgets. Site Origin widgets that require a WYSIWYG-editor ...
0
votes
0answers
17 views

Removing options from attachment details

In the image gallery section of my Wordpress admin, when I click on an image I get something like this: My site allows multiple users to add images and I feel that most of these fields are ...
0
votes
0answers
32 views

Put dynamic Javascript in header after doing operations

I want to write a plugin that enables a function to be put in my theme in various places. Then I would like to collect the parameters called and generate a Javascript and put it into my site ...
0
votes
0answers
28 views

Changing post status with js

I'm having issues grabbing some actions inside a navigation menu.. So it's going like this(for the publish button) HTML <a href="javascript:updatepost()" class="menu-item fa ...
0
votes
0answers
50 views

Uncaught error when calling .select2() on widget update in WordPress widget.php

Uncaught query function not defined for Select2 s2id_widget-daily_deal_widget-__i__-select_product displays when calling .select2() on widget update in WordPress widget.php ...
0
votes
0answers
73 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
27 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
28 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
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 ...
0
votes
0answers
50 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
0answers
40 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
67 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, ...
0
votes
0answers
15 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
69 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
0answers
29 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
35 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 ...
0
votes
0answers
31 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
113 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
0answers
35 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 ...
0
votes
0answers
94 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
0answers
89 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 ...