A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
1answer
127 views

Combining results from WP-API using AngularJS

I currently have this site - http://dev.5874.co.uk/scd-data/ where I have a dropdown which displays results from WP-API which I am pulling in through AngularJS. It currently combines the two sets of ...
-1
votes
1answer
211 views

Passing javascript variable to php file

I can't find the best way to pass a JavaScript variable to use in a PHP file. I found this function wp_localize_script(), but it does exactly the contrary. Is there a way to pass a JavaScript ...
0
votes
2answers
74 views

load ajax using admin-ajax.php

The append result is 0, instead of a list with the title ass a link. If I check this locally (http://localhost/wordpress/wp-admin/admin-ajax.php?action=lateral_fluid), I get the titles ass a link. I ...
1
vote
0answers
42 views

Add custom JavaScript that is a combination of CDN/uploaded files and easily-edited code?

I would like to add some custom JavaScript to my site: a combination of external CDN-hosted files, static library files hosted locally, and local JavaScript that I'd like to be able to edit in the ...
1
vote
1answer
31 views

I am facing a problem with the navigation menu of my website

The link to my website is http://ashevilleandbeyond.com/ and when you load it on your browser, for a few initial loading seconds, you will notice that the menu items are visible at the top left side ...
0
votes
1answer
92 views

Facebook share button only share the_permalink(), without thumbnail, tilte, excerpt, etc

I'm trying to add socials to my post. I can share the post, but only the post URL. How could I share the post thumbnail, the Title, the excerpt, the author, etc. This is what i'm trying: HTML (in ...
0
votes
1answer
242 views

How do I make multiple dependent input fields that use the jquery autocomplete function?

I'm trying to create a form that will allow the user to add a new listing on the front side of my equipment classifieds website. I have a custom post type set up with a custom taxonomy called ...
0
votes
0answers
29 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 I'...
1
vote
0answers
92 views

Call javascript function when category was added via ajax

I've created a plugin to handle featured images for categories (well, for custom taxonomy actually, but it doesn't matter). Everything is working fine, except the featured image is not cleared after ...
0
votes
3answers
30 views

jQuery search function not running in Wordpress but running locally (fiddle)

as the title suggests, I am running into this annoying issue: The search is not working in wordpress but it is working in the fiddle and locally. The sorting is working in wordpress. I have the ...
8
votes
3answers
265 views

Any advantage of using wp_scripts and is_IE when enqueuing scripts

I read on the WP docs, which pointed to this gist that the correct way to enqueue styles for IE is by using the $wp_styles. I'm guessing that this would be true then for scripts as well. Take these ...
0
votes
1answer
50 views

How should I go about registering JavaScript that isn't a file? [duplicate]

For a plugin I'm creating it generates custom JavaScript that should be executed in the footer of the page. Being that it's custom JavaScript, I can't simply put it in a file and register & ...
1
vote
1answer
49 views

WP functions in .js

I have a huge main.js which includes 99% of my JS + plugins' JS. While loading time is a little bit longer when user visits the site for the first time, it gets cached and there will not be any other ....
1
vote
0answers
237 views

How to refresh Theme Customizer after change color inside wpColorPicker?

I develop my custom widget with setting where I can set up custom color for the widget. I use this code to initialize wpColorPicker instead of default text input in form() method of Widget class: ...
0
votes
1answer
65 views

Detect Featured Image remove while editing post in wp-admin (client-side)

I'm looking to add some client-side (JavaScript) events to the post edit screen of wp-admin (post.php?action=edit). I wish to fire events when the user selects a new featured image and a different ...
1
vote
1answer
324 views

Wordpress Rest API

I'm trying to call a post from a Wordpress install using WP REST API. I keep getting an error in return and I can't find out why. Do I need to authenticate? One website said I don't need to ...
1
vote
0answers
36 views

Redux Framework: Page freezes on typing in Editor

I am using Redux Framework. I am facing an Issue with the editor in Theme Options of Redux Framework Currently I have 103 editors in the options. My Issue is that whenever I start typing ...
0
votes
1answer
41 views

Why is this script not working?

I've got the script from here http://www.mikedoesweb.com/2012/convert-tag-to-google-maps-embed-automatically-with-jquery/ I need to replace an address with a google map inside the post content. None ...
1
vote
0answers
19 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.
1
vote
1answer
42 views

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
30 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( '...
2
votes
1answer
29 views

Run a Parallel PHP Application with Wordpress

I have a PHP based application that runs on the Google Maps API. Most of it is written in straight PHP and Javascript, but I want to use some sort of CMS or tool to upload images, because there will ...
1
vote
1answer
36 views

Creating multiple enclosing shortcodes and fixing JS issues on click

I have the following shortcode to create multiple 'more' sections in any page/post: function more_shortcode( $atts , $content = null ){ return '<div id="more-outer"><a href="#" id="more-...
0
votes
1answer
17 views

Meta Box - Javascript Datatable

Hello my fellow WP Developers, I am running into a wall with a custom theme I am creating for a personal project. Background It's a website that will be used by users that collect a specific ...
1
vote
2answers
172 views

How do I embed a Javascript form directly into a page?

I have a new WP install with the Jupiter Theme installed. I have a contact form created in Sharpspring, a CRM that purports to work perfectly with WP, and automatically generates embed codes for ...
0
votes
1answer
88 views

JavaScript and Google PageSpeed + wp_enqueue_script

The best theme in WordPress theme development requires a standard protocol of enqueuing scripts through wp_enqueue_script, but this doesn't solve the problem and Google PageSpeed suffers. I found a ...
0
votes
1answer
107 views

Is there a better way to access transients using javascript

I've been searching around the web trying to find a better way to use wordpress transients with javascript. Currently I am using admin-ajax to run a php function that retrieves the transient and ...
0
votes
2answers
943 views

Get the current post ID as a variable in Javascript

I'm trying to echo the post ID in a post Javascript and not having any luck. var post_id = '123'; // works fine var post_id = '<?php global $post; echo $post->ID; ?>'; // echos 'ID; ?>'...
14
votes
2answers
8k views

What does wp-embed.min.js do in WordPress 4.4?

Question What does the wp-embed.min.js file do? I noticed it is added to the end of my blog page footer. How can I get rid of it? Effort After some googling and I found Embeds on the Codex. Why ...
1
vote
1answer
30 views

Adding custom directory and PHP files in wordpress

I'm new to WordPress and I'm using the latest version. I am trying to add this library https://github.com/pinceladasdaweb/tweetlight which is getting the latest tweets from Twitter. Tweets should be ...
-1
votes
1answer
21 views

Trouble figuring out how to get my button to submit comment

I have a text area in the sidebar (sidebar-chat.php) of my posts page with an input that is an image. When this image is clicked, the comment is supposed to submit. I am just having trouble figuring ...
0
votes
0answers
8 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
1answer
61 views

Masonry - Can't Find Variable imagesLoaded

So I am current building a site with the pieces theme which has built in masonry. When the theme was stock, the masonry was working however as I have begun to make modifications to the theme I have ...
0
votes
0answers
39 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
1answer
50 views

Javascript in plugin not working

I'm working on a plugin that relies on several JS scripts. In my plugin file (graph-plugin.php) I've the following function: function initialize_scripts() { wp_register_script( 'int-flot', ...
0
votes
1answer
50 views

Searching & displaying results from the Wordpress database on another (Multisite)site

We have site 1, where there is a custom posttype called listings. On site 1 we have included a search/filter facility, but we have been asked to display this information on a completely separate, ...
0
votes
1answer
50 views

How to blur the_post_thumbnail() via blur.js (jquery)?

I want to use blur.js (blurjs.com) to blur the post thumbnail. But it seems that the .js can't grab the image out of the_post_thumbnail(). If I follow the instructions from the website and build my ...
-1
votes
2answers
35 views

Unable to change the location of a file

I am unable to change the location of src attribute mentioned below <img class="srcimage" src=server-side4.php/> I want to change it to src=scripts/server-side4.php This is the javascript ...
0
votes
0answers
49 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(){ jQuery(".grid-item").first().addClass("...
0
votes
0answers
17 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
58 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 ...
1
vote
0answers
77 views

How do I pass the id of my widget to javascript in the form function?

I would like to add a Quilljs editor to the admin area of my widget, but I am having trouble passing $this->id to javascript. I am using the foo_example widget code, and I've appended the ...
0
votes
0answers
106 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
38 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 page,...
0
votes
1answer
14 views

Link to page with posts of specific type

This might be a stupid question, but I am having difficulty finding an answer on google. I have a section of my site that loads 4 divs with a post title, excerpt and 'read more' link to the full post. ...
0
votes
1answer
1k views

Woocommerce Ajax Add cart not working

In woocommerce ajax add to cart method not adding when cart is empty, if cart contains something then my ajax function adds but if cart is empty it doesn't add. And no error. Here is the link. PHP ...
0
votes
1answer
37 views

Getting 404 in the Javascript

I have directory called "api" and in that I want to run a php script called "tweet.php". This script file is calling inside a JS file. However I am getting a 404. Need help to solve the issue. Link ...
0
votes
0answers
43 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
18 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
1answer
39 views

Menu Details Output in Javascript [closed]

I have to output page, parameters( Page Url, Page Name, and Page's featured image) in javascript loop, one by one I think we can display it through NavMenuItems or NavMenu functions Pages displayed ...