Tagged Questions

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is included with WordPress, and available to both themes and plugin developers.

learn more… | top users | synonyms

0
votes
1answer
8 views

Create “archives by year and week” by category template

I'm trying to figure out a problem quite tuff; I explain myself; I have my pages ( which are in fact a category template). I take for example this website: http://www.irishpost.co.uk/ Where the ...
0
votes
1answer
33 views

Custom meta box with jQuery.sortable custom post type list

What I'm trying to do is have a custom post type ordered differently on different pages. I've searched around for quite a while and can't seem to find anything to help. I have a post type named staff ...
0
votes
0answers
31 views

Use jQuery and AJAX to get HTML

I have a jquery function in my theme that should send an array of filters to a PHP file, which should then return a piece of HTML with the filtered posts (it then replaces the contents of a ...
1
vote
2answers
42 views

Can't get a JSON object in response to an ajax request with wp_ajax

I have a problem with WordPress and ajax. This is my javascript part (I trimmed it a bit): var posts = $.ajax({ type: 'POST', url: ajaxurl, async: false, dataType: 'json', data: ...
0
votes
0answers
12 views

enode correctly the results from $wpdb->get_results to be passed to jquery autocomplete [closed]

i've been reading jQuery's Autocomplete here Now, i'm querying the db with $wpdb->get_results and getting an array as follows: Array ( [0] => stdClass Object ( [c_name] => Data ...
0
votes
0answers
11 views

Implementing parallax scrolling per page [closed]

Does anyone knows if there is a plugin that allows me to add a parallax scrolling effect per page? I´ve been looking around but can´t find one. Any help would be greatly appreciate it. Thanks
-1
votes
0answers
21 views

$(this) scope in jQuery [closed]

I have jQuery this object with different scopes, what's the best way of changing the scope for console.log below? if(this.length) var self = $(this); <!-- foo --> return ...
0
votes
1answer
22 views

Does WordPress support Plupload chunking when uploading asynchronously?

I'm using the Plupload library to upload audio files to my website from the front-end. Here is an example of my Plupload config: var uploader = new plupload.Uploader({ browse_button : 'browse', ...
0
votes
0answers
21 views

Using wordpress with AJAX queries

I have built a custom theme for wordpress and I decided to use AJAX instead of just refreshing the page on each call. However, when I add the Wordpress loop to call in my data, it doesn't load at all, ...
0
votes
1answer
24 views

Wordpress Javascript Widget jQuery Dependency Issue

I am using a local clean install of WP 4.0 en_GB with no plugins. I have been provided with some information to implement a JS widget into my website. <div id="login"></div> <script ...
2
votes
0answers
21 views

How to enable “shift-click to edit this widget” functionality on a custom widget?

I have created several custom widgets using the default widgets code as examples. The widgets all work fine, and I've been using them in production for awhile. I've been working with the new ...
0
votes
0answers
17 views

Hide shortcodes “code” when using the “editor” the same as wordpress do with “gallery”

i have question, how to hide the "shortcode code" when using the "editor" the same as wordpress do with "gallery"? my clients hate to see shortcodes as "code". And the truth, not only him, but a lot ...
0
votes
1answer
24 views

JQuery Plugins in Wordpress

I have been able to somewhat piece together how this should be done but I am really struggling with it. I want to use the Table Sorter plugin (http://tablesorter.com) in a custom Page Template to ...
0
votes
0answers
30 views

How to edit classes inside shortcode with jQuery

Please someone help me to do this .. I want to add FontAwesome shortcode to my theme I have a shortcode that is generated: add_shortcode( 'sh_icon', function( $atts, $content=null ){ $atts = ...
0
votes
0answers
27 views

Get the number of added tags using jQuery

I've added my jQuery scripts as the following shows: function my_enqueue( $hook ) { if( 'post.php' != $hook ) { return; } wp_enqueue_script( 'my_custom_script', get_template_directory_uri() ...
0
votes
0answers
24 views

can i use same plugin on several pages even if it werent supported by developer? [on hold]

i want to use that https://wordpress.org/plugins/jqueryfacebookwallwplight/ plugin or a similar one on each user'wall on my website . .. its not supported by the dev but i can generate a short code ...
0
votes
1answer
35 views

Periodically getting jQuery “… is not a function” errors [closed]

I've been encountering a strange problem over the last week or 2 in that I keep periodically getting an TypeError: jQuery(...).fullpage is not a function error when trying to run a little script. ...
0
votes
1answer
17 views

jQuery post method in admin menu

I'm trying to use this: jQuery(document).ready(function(){ jQuery("#button").click(function(){ jQuery.post("post_file.php") }); }); on this: ...
0
votes
1answer
25 views

Adding a slide toggle on Wordpress

I'm trying to create a sliding toggle to show and hide a box that I'm creating but I'm not having success on it, does Wordpress have any required special thing to make it work? here's my code and ...
0
votes
0answers
35 views

Display wordpress post's in popup?

I am developing a wordpress site with some blogs.Each blog post will have an READ MORE link.when clicking the READ MORE it should open a popup box with that post contents. Can any one suggest me on ...
0
votes
0answers
38 views

extra code in <head> - blank jquery function

I recently noticed that in the of my website (goinspire.com), there are 2 occurrences of the following code: <script>jQuery(function(){});</script> It looks like a script with a blank ...
-1
votes
1answer
27 views

Uncaught TypeError: number is not a function [closed]

<script type="text/javascript" charset="utf8"> jQuery('img').each( function($) { var mySrc = $(this).attr( "src" ); $(this).before( '<a href="' + mySrc + '" class="link">' ); ...
0
votes
0answers
58 views

Radio buttons value not calculated and div not displayed on button click event

I have a list of index and in each index I have 3 fields indexno, indexname and parts. parts is parent and has sub fields partno, partname and partvalue. Each part is displayed as a radio button. ...
0
votes
1answer
36 views

AJAX values converted to PHP Variables?

I just started playing with Wordpress and I have a question about the AJAX side of things. I think that I understand how the AJAX front-end to server side processing, back to font-end works. But, I ...
0
votes
0answers
52 views

Social Media button function using jquery

I've wrote a fairly small function that I'm trying to get working. At the moment the jquery doesn't seem to have any effect on the html selected. I've checked the "inspect element" all file's are been ...
0
votes
0answers
22 views

How can I correctly POST to a Wordpress page?

I'm creating a timetable page for a community-run bus route planner/timetable site, and I'm currently coding a page where the user can select their desired bus from a drop-down list, and then PHP will ...
0
votes
1answer
30 views

Script work on non logged in user but not work for logged in user?

I am currently working with jquery and wordpress plugin. jQuery(document).ready(function($) { $('.btn').click(function(){ alert("hello world"); }); }); This code working very well ...
0
votes
0answers
36 views

How to e.preventDefault() on an admin post page for a submit() action?

Lately, I have had a problem with a seemeingly simple task of preventing a form submission an a post admin page in WP. In a nutshell: I created a meta box on an admin custom-post page that includes ...
0
votes
0answers
91 views

admin-ajax.php not working after wordpress 4 update

n WordPress 3.9.2 access to admin-ajax was working for non loggedin users. When I upgraded the script stop working. I have the following code in functions.php function theme_name_scripts() { ...
0
votes
1answer
47 views

How to include my Ajax calls in one function instead of calling different ones every time?

I'm doing something like this to refresh a widget: add_action( 'admin_footer', 'my_action_javascript' ); // Write our JS below here function my_action_javascript() { ?> <script ...
0
votes
0answers
51 views

drag & drop re arrange menu items in front end page

in my WP MultiUser project i am designing a template for managing the menu like delete page, drag & reorder menu items by using below code <?php $menu_name = 'header'; if ( ( $locations ...
0
votes
0answers
21 views

Copy image url to my own field in media upload

i have add new field in media upload for slider plugin. what i don't get it how to copy the image url to my own field. look at the screenshot:
1
vote
1answer
60 views

Using multiple versions of jQuery while still calling it like WP likes

I have two JS plugins inside my plugin. One uses jQuery 1.7.1 and the other 1.9.1. I need to have each of them use different version. This is how things are at the moment: Plugin php file: ...
0
votes
1answer
207 views

Add Infinite Scroll to Ajax Loaded Category Query

Update: This has been resolved. See update below. Following a few different online tutorials, I've managed to create a function to modify my post display via Ajax based on a category selected from a ...
0
votes
1answer
40 views

how to use wp_editor() here am getting empty result

<p> Messenger: <br /><?php wp_editor( '', 'mailling_messenger1', $settings = array('mailling_messenger1' => post_content) ); ?> <p> here am using wp_editor to get mail ...
0
votes
0answers
13 views

Where should i put my php script for ajax implementation in wordpress? [duplicate]

I want to implement ajax on a page . i create a folder under plugins and put php page there and it works(when i gave the correct path in jquery). But when i try to call any WordPress functions it ...
-1
votes
1answer
59 views

Adding JS functionality to the Publish button in wp-admin/post.php

I've created a plugin with a new metabox in my post.php. It's working fine on it's own, but the problem is getting it to save it's values if the users choose to press the "Publish/Update/Save" in ...
0
votes
1answer
26 views

How to prevent tabs from opening all at once

I'm stuck on a plugin I'm writing to show and hide content in large texts. The html below is loaded using shortcode in the text editor. <p>Completely synergize resource <a href="#" ...
0
votes
1answer
335 views

Display data on same page as form without refresh

I am not sure if there is something about wordpress, or what I am doing, but I can not get online tutorials to work when implementing in a page template. For example this ...
0
votes
1answer
306 views

AJAX fileupload - TypeError: not a function ajaxSubmit()

I have a plugin that works as a standard POST but not as an AJAX POST request. I am getting a not a function error in Firebug with this function: TypeError: jQuery(...).ajaxSubmit is not a function ...
0
votes
1answer
74 views

How do I translate string inside jQuery script with WPML?

I've made this script for changing some colors on a custom element. My problem is that I can't find a way to localize the links in the href attribute. Is there an easy way for me to do this? /* ...
1
vote
1answer
55 views

Using shipped version of jquery

Thare are no errors in the JS console. My goal is to use the shipped version of jQuery that Wordpress uses to work with bxslider. According the link shown here, the current version of jquery shipped ...
0
votes
2answers
36 views

Stop Wordpress processing Javascript as text

I'm currently developing a bus route planner, using Wordpress as my CMS. I've added some JQuery code to add support for ajax (so visitors can use the route planner and load the route without having to ...
0
votes
0answers
10 views

Validate email, if field has characters

I am building a small form on my website where I want users to be able to send me a message and have the option to include their email in an email input. It's fairly simple: ...
1
vote
1answer
68 views

Passing jQuery into the Wordpress media uploader

In a Wordpress plugin that I am working on, I am using the built-in Wordpress media uploader function ( wp.media ) to add photos. I am using the selection option to pre-select images in the media ...
0
votes
0answers
12 views

Foundation JS working in staging site, but not on live site

I'm having an odd issue on a site I've built for a client in that the Foundation JS files that I'm using for a couple of elements don't seem to be working on the live version of the site but they were ...
0
votes
1answer
29 views

How to deregister scripts all at once

How can I deregister all wordpress scripts all at once except for the admin? I have looked at the discussion How can I de-register ALL styles all at once? And same with Javascript?, but i do not want ...
0
votes
1answer
62 views

Flexslider won't work on Wordpress

Hi guys I recently created a custom post type for flexslider on my Wordpress theme. However upon testing it got some issues. The slider is showing up but the images wont show up on it. There are two ...
0
votes
1answer
46 views

how to get the post id in plugin

I have a plugin that I'm working on and I'm having trouble getting the post id so jquery can use it. I'm able to get it using the admin_head hook but I'm not sure how I can return it to jquery. I'm ...
0
votes
1answer
31 views

No Authors for custom post type

I am trying to implement custom post type in Wordpress. plugin: Advanced Custom Fields register_post_type('acf', array( 'labels' => $labels, 'public' => false, ...