Tagged Questions

A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
0answers
167 views

How do i keep my current page menu highlighted on pagination?

I have a navigation menu in a page that highlights the current menu you’re on based on the URL by adding a class. My problem is that my page is paginated, so sometimes the user will end up at: ...
1
vote
1answer
79 views

JQuery not working in my plugin [closed]

This is my first time using JQuery in a WordPress plugin, and I'm having some trouble. Here is my "main" plugin document: <?php /* Plugin Name: Dump-It Scheduler Plugin URI: ...
2
votes
2answers
186 views

js Conflict in admin panel - I guess it's from the core WP installation

A client's site: causing serious js conflict or js loading disabilities, is under custody. Activating DEBUG, Deactivating all Plugins, and Activating Default theme "T13" found that, still the problem ...
0
votes
0answers
89 views

Adding SSL verification seal javascript from Thawte breaks website

We are trying to add Thawte SSL seal javascript to our website, but it keeps everything else from loading if added to a normal text widget. For example, if we add it to where the Thawte SSL image link ...
1
vote
1answer
289 views

How to run a external JavaScript file on wp-admin if admin, and other if normal user?

I'm new to WordPress plugins, and I'm trying to load a external JS/jQuery file with some scripts I need. It needs to run in the wp-admin page (not just once when activated). There is a JS file for a ...
0
votes
3answers
292 views

Unable to run jQuery script in my template file

I really want to run a simple code in my template file. E.g. if I put somethign like this in my page.php: <script type="text/javascript"> jQuery(document).ready(function($) { ...
0
votes
2answers
3k views

Using TinyMce with textareas in meta boxes on custom post types

I am trying to use the http://www.tinymce.com/ plugin to add a tinymce to my textareas in my meta boxes I have created. I've googled other ways and either I cant get it to work or didnt grasp the ...
0
votes
1answer
86 views

How do I include javascript/jquery image resizing with wordpress?

I wan't to include this script in my wordpress theme, making it resize all of the images inside posts according to the current window height: https://github.com/gutierrezalex/photo-resize I've made ...
0
votes
1answer
2k views

Parse wordpress blog data using json api and ajax

I have seen lots of responses to how to extract data from wordpress blog posts using the json api plugin. Many uses $.getJSON, $.ajax, .responseData.feed.entries, success function() etc. What is the ...
1
vote
1answer
138 views

Where to call wp_enqueue_script in a plugin with custom template?

I am writing my first plugin and I have this code in the main plugin php to replace home page with custom template add_filter( 'template_include', 'replace_home_page' ); function replace_home_page( ...
0
votes
1answer
172 views

Using admin-ajax prevents regular php form submission

I have a page with a table of posts and groups of checkbox filters in the sidebar. Looks something like this: www.example.com/toylist |___________| |_______________________| | [ ] Red | | ...
0
votes
1answer
196 views

2nd page displaying the exact same posts as my first page (minus the very first post)

Site Links: http://manofmany.com & http://manofmany.com/page/2/ I'm seeing my 2nd page displaying the exact same posts as my first page (minus the very first/latest post). All other pages 3,4,5 ...
0
votes
1answer
24 views

how to request a script more than once in wordpress

Can I ask how I can request a script more than once in wordpress. For example: for($i = 0; $i < 2 ; $i++){ wp_enqueue_script('alerthello.js', 'example.com/example.js'); } I expect the code to ...
0
votes
0answers
87 views

Why can't I load JS script in a plugin?

I have this at the bottom of my plugin file, but while I can access the plugin, I can't see any reference in the code to jquery.chained.min.js in the source: add_action( 'wp_enqueue_scripts', ...
3
votes
1answer
1k views

wp_enqueue_script : how to change loading order of scripts?

I would like to know how to list all scripts loaded on a page, ranked by order and change this order.
0
votes
1answer
359 views

Problem after upgrade to 3.6.1

Really wishing there was a role-back feature installed. I upgraded last night, now when I open the dashboard one of the javascript modules is causing an infinite loop by including the 'Welcome to ...
-1
votes
3answers
670 views

Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)

I've searched a lot for this and I seem to get different answers. In my situation, my jQuery function has to use a PHP variable from a different file. How can I accomplish this? Clear and simple ...
0
votes
0answers
145 views

Responsive theme 'undefined' on woocommerce single product pages in mobile nav bar

I am using the responsive theme for my mobile site and am using 'any mobile theme' plugin to implement that them whenever someone is on a mobile device. when I am on a woocommerce single product page ...
0
votes
1answer
1k views

Get content from WordPress posts in Boostrap modal window - Javascript side?

I have a WordPress page with a grid that pull posts. Each post is in a box showing the title + thumbnail and upon clicking on it the content of the post should also appear in the modal (namely, ...
0
votes
1answer
44 views

javascripts files not linking to my category slugs?

I have a wordpress custom theme set-up and what i want is to create separate category templates, now seeing the template hierarchy i created the category-{slug} file and now when i am linking my ...
1
vote
2answers
164 views

Putting PHP variables into javascript [duplicate]

I've created a simple theme options page for my site. The options page contains three input fields. I can output the the fields by using get_option. The three fields are called using the following: ...
-1
votes
1answer
346 views

how woocommerce swatch color name when hovered or selected

I have the woocommerce plugin and the woocommerce swatches and photos extension that shows swatches instead of variations as a drop down. When hovering over the swatches and when a swatch is ...
1
vote
1answer
67 views

Proper way to enqueue a generated script that isn't in a .js file?

What's the proper way for loading a script via WordPress that isn't in a .js file? I'm generating some javascript on the fly based on some field options in a plugin. I want to load it into the page, ...
0
votes
1answer
491 views

Problem passing id-specific objects to javascript via wp_localize_script

I'm using wp_localize_script to pass multiple arrays of data into a javascript file. To differentiate between the different arrays (and prevent overwriting), they are labelled relative to the post id ...
0
votes
1answer
28 views

Will this js code work in a page template?

I have been given this code that I want to adapt and use to change a link in a template.php file, I have not been able to adapt it to work so would love any help that can be given. <script ...
0
votes
0answers
38 views

Page template dynamic links based on browser size

I have a page template that links though to another php file to define what is displayed. The code for the page is - <?php /* Template Name: Portfolio */ ?> <?php get_header(); ?> ...
0
votes
0answers
130 views

javascript errors on mobile browser, not on desktop

I'm building an application based on the wordpress backend. The app is working correctly on desktop, but on my ipad I noticed the javascript broke. I made some investigations and I discovered that ...
0
votes
1answer
313 views

Resolving Javascript errors likely related to Gantry framework

I'm trying to resolve some Javascript errors on a site I'm working on (built using the Gantry framework), as I have a sneaking suspicion they're keeping some plugins from working properly. For ...
0
votes
2answers
3k views

Load page HTML content through AJAX

I'm currently building a single page style site that loads all content through AJAX, but will degrade back to a standard page load if javascript isn't present. I have done AJAX loading in the past ...
2
votes
1answer
488 views

Ajax template: how to handle head section

I know it's easy stuff, but I'm new to this and I can't understand which is the best approach. Background The template I'm working on is a dual theme Desktop/Mobile, UA Sniffing based. Now I just ...
0
votes
1answer
433 views

Load content dynamically & resize event

On complex layouts, heavy use of Media Queries affect performances since the mobile browser still loads all elements that has been hidden. For what I understand now, to load the right layout/content ...
2
votes
3answers
3k views

How to prevent wordpress from loading old versions of jquery in wp_head();?

I noticed my twenty twelve theme is including outdated versions of jquery and js so I want to replace the scripts with the newer versions, however the scripts are in the file included by wp_head() ...
0
votes
1answer
238 views

Why won't the Comprehensive Google Map Plugin load?

all. I could use some help troubleshooting a plugin, since the plugin's author hasn't responding to support threads on the plugin page. I'm using the Comprehensive Google Map Plugin to display a map ...
-1
votes
2answers
741 views

Why isn't wp_enqueue_script('jquery-masonry') working?

I'm trying to add masonry sript to my site, but wp_enqueue_script('jquery-masonry'); is not adding the script. Instead I have to use: wp_register_script('jquery_masonry', includes_url(). ...
0
votes
0answers
240 views

Plugin - including external javascript calling google maps

I have developed a javascript plugin retrieving data for my website (no wordpress here). The user can simply add it to its website with a div (the container of the plugin) and a script tag (the ...
0
votes
2answers
1k views

wp_enqueue_script not working?

Excuse me, I'm very new to PHP and WordPress, but I'm trying to link to an exterenal js file called trans.js, that relies on jQuery. Here is the code at the beginning of the header.php: <script ...
0
votes
1answer
36 views

Can't attach Javascript to theme

I'm currently learning theme development, and tweaking the twentytwelve theme. I've got an external javascript file I'm trying to link, but it won't seem to register. The codex tells me: <script ...
0
votes
3answers
1k views

Wordpress Ajax always returns a 404 error

I just got this code from a tutorial. I can't seem to get it to work. HTML (home.php) <form name="myform" id="myform" action="" method="POST"> <!-- The Name form field --> ...
0
votes
1answer
31 views

How to add Wordpress JS Script Links

Hi I do have a code here from my HTML. I just dont know/forgot on how to link scripts in wordpress... <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> ...
1
vote
1answer
608 views

retrieve custom image sizes from media uploader javascript object

I am attempting to get the custom image sizes that I've created using add_image_size to return in the javascript object. I know how to include them in the dropdown, but I don't want / need that. The ...
0
votes
2answers
67 views

how to make my website secured

i have a php code inside my website to a quotation form that has java script for making name , telephone number and email rquired fields before submiting the form and its working fine but a few ...
0
votes
1answer
57 views

Dealing with a library that depends on jQuery

I am about to use the pikachoose.com library with wordpress. However, this library references jQuery, and uses the short form (using $). In WordPress documentation, it states that the short form ...
0
votes
1answer
58 views

JavaScript Libraries in WordPress

I understand that in order to use a JavaScript library in WordPress, such as jQuery, we have to use the following code to prevent conflicts: function my_scripts_method() { wp_enqueue_script( ...
0
votes
1answer
348 views

in jquery read a multidimensional array via wp_localize_script()

From PHP I am pushing a basic array to jQuery via wp_localize_script() and then using the array data in my script file. Now I have extended the array into a multidimensional array and can not figure ...
0
votes
1answer
230 views

loading a javascript on a WP PAGE

so im trying to do this http://jsfiddle.net/2XV7w/5/ on my custom_page on wordpress. this is a conditional html form. It will display a specific <div> when i choose a specific drop-down value. ...
0
votes
2answers
228 views

creating a static HTML/JS/PHP page

i need to create a static page that allows me to code HTML/JS/PHP that connects to a separate MYSQL backend. how can i achieve such in wordpress page?
1
vote
2answers
774 views

Run shortcode at certain resolution

I've gone a roundabout way of trying to ask a question about this here: Loading shortcode with ajax but figured it might be worth asking the fundamental question of what I am trying to do without ...
1
vote
0answers
165 views

Fancybox type popup window that's not an iframe

I'm a bit stuck and need some help to get me going in the right direction. I'm trying to do something similar to the lightbox style popup on this website: http://cargocollective.com/montessori I ...
0
votes
1answer
314 views

Javascript/jquery loads super slow (around 6 seconds) which affects only homepage

I got a custom wordpress theme from a developer but he isn't responding to me anymore. Basically my homepage takes ages to load which causes all the elements on the homepage not function until the ...
3
votes
1answer
150 views

How to intercept already localized scripts

If a plugin uses some script (prominent example: jQuery UI Datepicker), but you're not happy with how the script renders the output, then there're two possibilities: 1. Unregister the script > Add ...