A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
1answer
49 views

JQuery and Javascript to pan image

I am trying to implement a panning effect on an image, by following this tutorial. However, it's not working and I think it may be due to the way the javascript is being referenced. The image that I ...
0
votes
0answers
14 views

How to hide a Control in the Customizer?

I know contextual controls hide if for example the user navigates from the viewer certain pages. But how can I achieve hiding a control under this scenario: There is a type Select Control with an ...
0
votes
0answers
36 views

how to make video autoplay on website in mobile using revolution slider

I understand that the video can't be played on mobile devices because of the ruling of the mobile data and other requirement. i also read comments on other articles on support. but i read some ...
0
votes
1answer
50 views

How to integrate a JS fiddle?

Dear StackExchange community, My goal is to add a second horizontal scrollbar on a very wide HTML table. I have downloaded a JS file recently that I wanted to use it on my website: ...
1
vote
1answer
60 views

angularjs not displaying all posts

I learned about angularjs today and I am trying to create a page for my search results so that I can be able to create facet filters. Currently I have a page template with the following code -- ...
0
votes
1answer
37 views

Simple JS function Not Working

I have been trying to get a simple JS function to work for the longest while but its just not working. Console says "test is not a function. echo '<input type="hidden" ...
1
vote
1answer
33 views

Show post in slider

I am working on wordpress project .I want to show the post details in such away that the first four post thumbnail would show on the top and show the content of first post below, after clicking on ...
1
vote
1answer
41 views

Storing posts from query and accessing later via AJAX call

To clarify the above question title, what I am trying to do is create a grid of posts, for which I am displaying a thumbnail of an image that is attached to that post. Then, upon clicking each of ...
0
votes
0answers
18 views

add <script data-pagespeed-no-defer> in wp_register_script function [duplicate]

I’m using PageSpeed on my website and it makes a huge speed difference in my website I have defer JavaScript on. And I’m facing an issue with a script that doesn’t work when deferred so I want ...
0
votes
1answer
196 views

wp.template() Not a function

When I console.log(wp) the object only includes: -wp.emoji -wp.heartbeat -wp.svgPainter Script is loaded in the footer and last in the DOM. What am I missing?
0
votes
1answer
50 views

Add a downloaded JS file to WordPress

I have a very large table (horizontally speaking) on my webpage and I added a scrollbar using the "overflow-y: auto;" property on my CSS, which does what I want. The problem is that this table is ...
1
vote
1answer
52 views

How to get javascript slider to work! [closed]

I've only just started to develop my own themes and i'm stuck adding javascript to my slider. I've added the slider into my index.php file as below: <div class="carousel"> <div ...
0
votes
1answer
28 views

Having trouble going from Jfiddle to implementing in Wordpress :(

If someone could point me in the right direction on how exactly to do this without yelling about follow codex site lol. I wouldnt be here if I wasnt able to get it working haha. I created a neat ...
0
votes
1answer
20 views

javascript not loading

Here is what I've done so far in functions.php function imk_scripts() { wp_enqueue_script( 'bootstrap_js', get_template_directory_uri() . '/js/bootstrap.min.js', ...
0
votes
0answers
27 views

how to display term name angularjs

I've recently learned about angularjs and I am trying to display a term associated with a specific custom taxonomy. So far this is what I've tried in my partials file - <div ng-repeat="post in ...
0
votes
1answer
50 views

Javascript code for Category

can I check if scripting can be encrypted for specific categories? For example, I would like to encrypt only for http://www.example.com/category/news/education, for ...
2
votes
2answers
964 views

WordPress Ajax Login without page reload

I'm currently developing a WordPress theme where I want the user to be able to upload images before he register or log in to the site. The initial problem was, you can't upload images to WordPress ...
0
votes
1answer
38 views

Issues trying to get an element by id

I'm trying to incorporate javascripts in my wordpress posts. I've previously done it by just adding it to the post in the wordpress editor, but I've heard the better way is to add it to a js directory ...
1
vote
0answers
28 views

Dynamic Custom Fields

I am working on a custom invoicing system for a client. I am looking for the best way to implement adding products dynamically to the invoice in the wordpress admin. There are hundreds of products ...
0
votes
1answer
28 views

Run JS Code on userlog out

I'm trying to delete a variable stored in local storage when user logs out of WordPress, none of the two code blocks below work for me, both have been tested in my functions.php file one at a time. ...
0
votes
0answers
27 views

Javascript attr href not appending parameters on WordPress site

I have this exact code set up and running on a regular HTML/PHP site but when I tried setting it up in WordPress, it doesn't work. The code itself works, the Javascript is present when I view the ...
0
votes
1answer
715 views

Dropdown menu on click change

Im working on a website where I need to create a submenu that shows only the parent pages. When I click on one of the parents it has to show the children from that parent. Here is the menu hierarchy ...
2
votes
1answer
55 views

Add colorpicker to featured image

I'm trying to add a colorpicker to the featured image meta-box. Here is some background: I use the featured image meta-box to place parallax background images. Because a user is allowed to place text ...
0
votes
0answers
41 views

Enable/disable code in functions.php with options

Is there a way to enable or disable lines of code in a themes functions.php file? Basically I would like to have a page in the admin panel that lists "modules" or separate php files and has the ...
-2
votes
1answer
55 views

Javascript code not working - $ is not a function error

On redesign out web site we wanted to add the slick js carousel function on the homepage. Followed the instructions to the slick javasriprt website http://kenwheeler.github.io/slick/ but it does not ...
2
votes
2answers
2k views

Can I include Javascript/jQuery in a page?

I'm extremely new to Wordpress, and I've offered to help out with a project that uses it. In a new page I'm creating, I need to use javascript/jQuery to write out the html dynamically - it doesn't ...
1
vote
1answer
33 views

How do I remove the date and category form my portfolio pages

This is one of my portfolio page Whenever I wanted to remove dates and category from blog posts I always used this code function jl_remove_post_dates() { add_filter('the_date', ...
0
votes
0answers
45 views

WP Disclaimer Popup Plugin Tweak

I am using WP Disclaimer PopUp by Art Armstrong and it is really perfect for what I'm doing. However I need one small simple tweak. I tried to hire him to do it but didn't get an answer. Whoever ...
0
votes
0answers
24 views

Javascript in WordPress Navigation - mobile menu

I added a Live Chat link to my WordPress navigation menu. I followed the Ideal solution #2 below which works great on the desktop, but not on the mobile menu. It doesn't do anything on mobile. Any ...
8
votes
3answers
227 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 ...
-1
votes
1answer
62 views

Gravity Forms closes my popup on Validation Error [closed]

I am having an issue with Gravity Forms. A user on my site can open a contact form in a popup menu by clicking a 'contact' button. The form is just in an absolute div that I show/hide on the contact ...
0
votes
1answer
68 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 ...
0
votes
1answer
136 views

Custom Plugin - CSS works, JS doesn't

In the plugin I'm making, I use separate js and css files (____.js, ____.css). This is the first time that I've included an external .js file in anything. I'm registering and enqueueing both in the ...
0
votes
2answers
43 views

Inserting ads within content

I want to show adsense ads below the 4th and 20th paragraph of every blog post, ONLY if there is a 20th paragraph. I managed to insert an ad below the 4th ad by placing the following code in my ...
1
vote
0answers
48 views

PhantomJS with wordpress

I know it sounds basic but I'd really appreciate some help/guidence on how to use phantomjs on my wordpress project. I'm using Windows 8.1 and local host with xampp for now. I've downloaded phantomjs ...
4
votes
1answer
7k views

AJAX filter posts on click based on category

This is my first foray into AJAX, I've been splicing bits of code from various tutorials which probably hasn't helped. I have a list of categories on my homepage (index.php) and a list of the most ...
1
vote
0answers
11 views

Weird issue with slider on javascript

I have a page that i am using revolution slider on the page and everything works fine. I have a global javascript that runs on each page that looks at the url variables on the page, city and tel and ...
0
votes
1answer
52 views

how to do open a link in a open window from menu bar? [closed]

I am working on a word press site. When I click on a entry in menu bar, it should open that link in a new window. I know how to do this for a button but not sure for a list item. This is the code ...
23
votes
1answer
5k views

Is it possible to reuse wp.media.editor Modal for dialogs other than media

To expand: I'd like to utilize the same Modal code/appearance ( as used in wp.media.Modal, wp.media.FocusManager ) to open a modal of my own custom dialog, not the Media Editor. In the past, I've ...
1
vote
0answers
44 views

Audio Player not loading when the content is loaded through Ajax, MediaElement.js no applied

When I load the content using ajax it doesn't apply MediaElements.js to my audio player, so the audio isn't display. I think this is because the MediaElement.js is loaded with wp-footer(), and this ...
0
votes
0answers
10 views

Can't see audio when I acces with ajax

I have created an ajax portfolio. It works fine, but when I upload an audio, this is not display. If I acces to the post via my blog page the audio is there. I inspect this file and I discover a ...
1
vote
1answer
46 views

Push metadata in array

Applying meta keys in search result Since I need to take on a different approach to get my data in javascript from wordpress, I am trying to apply (as follow up on my post earlier today ...
1
vote
1answer
53 views

How can I output a php value into a JS file within Wordpress?

I am trying to use get_theme_mod option from php to load into my js file. I've used wp_localize_script to convert. The tweet_id is where I need to place the $tweet value outputted. Any help would ...
2
votes
5answers
4k views

Asynchronous Javascript Loaders

I'd like to take advantage of loading my scripts while the page is loading. ie. Yepnope, head.js etc... But I also want to be able to enqueue the script so other plugins don't try adding their own. ...
-1
votes
1answer
164 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
55 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
35 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
24 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
67 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
201 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 ...