A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
1answer
24 views

WP Rest API - How to get featured image

I'm very new to this API, in fact I've only spent couple hours on it so far. I've done my research but cannot find anything about it... The issue is, I can't seem to get the featured image of a post. ...
0
votes
1answer
22 views

WordPress wp_enqueue_script only adds text to top of page source

All I'm trying to do is add some javascript to a WordPress theme I'm making. My functions.php file looks like this: function my_scripts() { wp_enqueue_script( 'jquery' ); wp_register_script(...
-4
votes
0answers
21 views

Shipping Calculator to recalculate totals via AJAX on selection of payment Gateway

I have designed a plugin for my website which calculates shipping costs dynamically from an external API based on the Pin code, weight & whether Cash on delivery is required or not. The entire ...
1
vote
1answer
65 views

wp_enqueue JavaScript in child-theme (ReferenceError) using Search & Go

This is my first post here, so I hope I pasted the code well and you'll stand by interpreting the problem. I have deregistered and dequeued two scripts in my childtheme. When removing and adding ...
0
votes
1answer
39 views

Where to find the html for Wordpress site?

Where can I find the HTML for a Wordpress site? I'm using the "X" child theme. I found a tutorial explaining how to achieve an effect that I want and it says that "All I need is an HTML markup and to ...
3
votes
1answer
60 views

How to preserve PHP modifications while upgrading WordPress?

I made a lot of custom modifications in the PHP code of my WordPress blog. Namely in: archive.php, blog.php, footer.php, functions.php, header.php, search.php To provide customized search results, ...
0
votes
0answers
11 views

Implement a layout for feautured images on a single category

This is kinda hard to explain but here we go, im trying to use the flex laytout from Freewall for my posts featured images on my category of "gallery", i want only the featured image to display the ...
0
votes
0answers
18 views

Code is transforming [closed]

Whenever I type in the following code in a code snippet... nfspothead?&currency=cad"; The text gets transformed to this... nfspothead?¤cy=cad"; Any ideas why? Thanks in advanced https://...
0
votes
1answer
26 views

Combine CSS and JS files from plugins

I want to combine all my CSS and JS files. Given the fact that I use different plugins I don't see a way to do this manually because after an update of the plugin I have to start all over. So I did ...
0
votes
0answers
18 views

AJAX call to Vimeo API from WP admin

What I am trying to do is query the Vimeo API to populate some ACF fields in a custom post type. I'm loading this in the admin head for WP Editor, which grabs the Vimeo URL from the ACF field, and ...
0
votes
0answers
8 views

Positioning the top attribute of a element with jquery [migrated]

I'm having an annoying issue trying to position the responsive navigation hamburger. I am using a plugin called responsive menu which creates the hamburger and uses absolute positioning. I am trying ...
-1
votes
2answers
34 views

javascript not loading in wordpress

I originally posted this in the stackoverflow, but I believe it is better posted here as I am using wordpress and a wordpress function. I am trying to add the jquery cycle plugin (http://jquery....
0
votes
0answers
9 views

Get a color name from any RGB combination (script included) [migrated]

i am returning a hex and an RGB color in my app (from camara) and i want to use a script to identify that color and display a name... ive found http://gauth.fr/2011/09/get-a-color-name-from-any-rgb-...
0
votes
1answer
23 views

customizer live preview layout picker

I'm trying to create a layout picker option using the wordpress customizer. What i've done so far works except for the live preview. when i change an option in the customizer for example left sidebar ...
1
vote
0answers
20 views

Wordpress Media frame pre load images from ids

Im using custom metabox button to create wp media frame with this code, var frame, selection, idsField = $('#_fills_ids'); frame = wp.media({ title: 'Select or Upload Media Of ...
0
votes
1answer
28 views

Move jQuery on *top* of footer

I am using this code by Peter Wilson to move jQuery to footer: function pwcc_jquery_to_footer( &$wp_scripts ) { if ( is_admin() ) { return; } /* Move jQuery to the ...
0
votes
0answers
10 views

Register a menu onclick function

I am trying to add this in an abc.php file where add_footer_menu() is a onclick function. This is showing me the "Menu added." but menu is actually not generating. <script type="text/javascript"&...
0
votes
1answer
33 views

Converting HTML to Wordpress theme: integrating pages function and using its text editor, conditional enqueuing

Recently I attempted to convert my static HTML to a Wordpress theme but to no avail. I was able to understand how to separate my code for my header, content, and footer, and I integrated the header ...
0
votes
1answer
14 views

Automatic add space if user enters number(any digit)

I have one input field in that I need to check that if user enters any digit then it automatic add spaces i.e. When someone enter a phone number like 0499287909 then in string should change the ...
-3
votes
1answer
27 views

How to hide a script ( an ad) from a specific post? [closed]

I would like to hide a script, an ad actually from a specific post. The script is placed on header. I am a rookie here so please help!
0
votes
1answer
10 views

Custom Media Meta fields to alter the generated image HTML that is inserted into a post for my animated GIF image player?

I want to add the capability to integrate a JavaScript animated GIF image player. It basically will load a cover image for the animated GIF on page load instead of downloading the larger animated ...
2
votes
2answers
41 views

Page Reloads Before AJAX Request Finishes

I am working on a WP plugin, and I need to be able to call a URL (specifically an AJAX function) using a button click, but the page refreshes after clicking it, which I think is preventing the AJAX ...
-1
votes
3answers
92 views

Enqueue scripts based on browser width?

Is it possible to load scripts through wp_enqueue_script based on a browser's width? Thanks
2
votes
1answer
36 views

How do I change number of columns in a proper way in twentyfourteen child theme?

I'm trying to deactive and reactive a javascript in my childtheme - from the twentyfourteen theme (so updates won't effect things). What I really want to do is to change column width from 4 to 3 in ...
0
votes
0answers
9 views

Pulling in post ID into Live Edit functionality

Pulling in post ID into Live Edit functionality I've got a social media site built off BuddyPress, where we've built custom post functionality off ACF fields, and I need to tie in front-end editing ...
-7
votes
1answer
46 views

show hide image script after 4 seconds [closed]

On my homepage I need a javascript/jQuery script to show our site logo image and close it after 5 seconds. Only when user visits the first time our site. No mouseover or clicks needed. Complete ...
1
vote
1answer
49 views

Integrate OpenStreetMap on WordPress

I want to put a map (using OpenStreetMap and OpenLayers) on a WordPress page. I don't want to use a plugin, because I have some specific operations I want to do with the map, and thus I want to stay ...
0
votes
1answer
35 views

Getting a variable inside foreach from PHP to JS after localization

I believe I have properly enqueue'ed and localized my script - I've got $q showing up in the DOM. Now I'm sure I'm missing the simple last step to accessing a variable in the JS function. Here's my ...
1
vote
1answer
23 views

How to handle malformed response from WP REST API?

Happy day scenario: I implement WP REST API that sends JSONs to a JavaScript client, which parses it and displays the data to the user. All is fine. What actually happens, inevitably: some WordPress ...
1
vote
2answers
34 views

Javascript that will execute on only child pages of a specific parent

Semi-new to WordPress, so apologies is this is an obvious question! I'm trying to execute some JavaScript on a WordPress site, but only on the child pages of a specific parent page - so, I have ...
1
vote
1answer
41 views

wp_register_script(… $in_footer = true) not working

I'd like to load some javascript files in my footer. I tried to accomplish it in functions.php like so: function my_init() { // LOAD JQUERY wp_deregister_script('jquery'); ...
0
votes
1answer
65 views

“JQMIGRATE: Migrate is Installed” How do I find the problem code?

I have a site and since updating to 4.5 it has a very subtle display bug that seems jQuery related (full bleed images have a white border that snaps away into correctness when you resize window). ...
0
votes
0answers
42 views

Can't get to work with Ajax and Modal Bootstrap

I'm working on a website that shows a list of products, and when each product is clicked a Modal window should appear, with some product info. So I have 3 files: main, header-main and product-info. I ...
0
votes
0answers
19 views

Highlighting HTML code entered in the text editor

I have a need to have both "rendered" html in a post and "raw" or highlighted html in a Wordpress 4.5.2 post or page. I have solved the former by simply editing in the text editor, placing my code in ...
0
votes
0answers
12 views

Managing advertising code snippets

I'm looking for a solution to manage a mix of advertising code snippets. Lets say you have three advertising contracts. adService1, adService2, adService3 each of them will have some code in the ...
0
votes
0answers
24 views

Adding Angular JS code snippets to pages?

I need to create a post type where an editor can insert 2 code blocks: one for "live" Angular JS HTML markup, and one for a pretty-printed sample of the code (which may or may not be the same code). ...
2
votes
1answer
21 views

How to create popup same as wordpress popup feature

I wants to include a popup window which is same like wordpress popup. Like if we click on the wordpress editor's link button it will open a popup window. I wants to create same like that.
0
votes
0answers
23 views

Auto expire page that contains specific text

Sorry, I'm relatively new to Wordpress. Is there a function or script that can automatically expire a page that contains specific text? I am using an RSS feed to display some content on a page (not ...
0
votes
1answer
19 views

Calling PHP Titles inside Javascript Markup

I have a video gallery, and all the titles are generated by php. They are coming from my Wordpress media library's attachment titles. The lightbox for these videos, however, is customized in ...
2
votes
0answers
15 views

Script won't execute in the media manager

I'm trying to execute a jquery script on the click of a button in a custom tab of the media manager, but it does not seem to work. I have been told this might be due to the button not being loaded ...
0
votes
1answer
52 views

TypeError: $ is not a function Error using parallax effect in Wordpress Template [duplicate]

I`m trying to include a parallax Effect into one of my cutsom page templates. The js function is returning the following error in the firebug console: TypeError: $ is not a function The error is on ...
-5
votes
1answer
56 views

Exclude script from running on certain pages [duplicate]

I would like to exclude a script from running on certain pages, Please can you tell me the best way to do this? Example: I do not want the script to run on page-id-9, page-id-11, but I want the ...
2
votes
0answers
19 views

Detecting Wordpress Customizer Panel

Recently started developing a Wordpress theme relying heavily on the customizer API. One thing I'm stuck with is detecting when a specific panel has been clicked or opened. Regular old "on click" ...
0
votes
1answer
18 views

How to toggle custom WP archive list

Help! I'm trying to toggle the "SideDish Archive" list in the right-hand sidebar of this page – http://my-table.com/sidedish/. I don't know really anything about javascript. Small company, small ...
0
votes
0answers
36 views

How to include JavaScript script only on specific page [duplicate]

I am creating my own widget. I need to use custom css and js files. I have used wp_register_style`wp_enqueue_styleandwp_register_script\wp_enqueue_script` functions in order to register custom styles ...
0
votes
2answers
24 views

Javascript not working on index.php but it is working on single post's page

I am trying to use mathJax in my wordpress. According to the documentation at mathjax, the mathjax script url needs to mentioned in headers.php. Which is exactly what I did. And right now this is what ...
0
votes
0answers
17 views

Widget save brake jQuery [duplicate]

I have created a plugin that creates a widget. On the widget form i am using jquery functions that i load using wp_enqueue_script. When adding the widget on a sidebar, everything works. Then when i ...
0
votes
0answers
19 views

Multi-step Frontend Filtering to Reveal Content

I'm not even really sure the best and easiest way to go about doing this - or what the right verbiage is to properly describe what I'm wanting to do. On my site I'm looking to change this selection ...
-1
votes
1answer
34 views

jQuery append only works if I select html in admin section [closed]

The following jQuery code works as expected, in that it inserts the specified html after the closing tag. $( "html" ).append( "<div id='bf_rsvp_note_display'></div>" ); However, that's ...
0
votes
0answers
39 views

Angular js template to wordpress theme conversion

Hi all currently i am working for angular template conversion to a wordpress custom theme development, I can able to fetch the post data, I am bit get stag with getting our menu's as dynamic. Here is ...