0
votes
0answers
26 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
1answer
23 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 ...
-2
votes
0answers
54 views

Plupload: frontend media upload

I want to allow non registered guest uploading all kind of media to my wordpress blog. Therefore I tried several different plugins but non of them have all the required features. NextGEN Gallery ...
0
votes
1answer
27 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
0answers
73 views

How to add jquery to my custom post type wp plugin

I want to include a jquery to my wordpress custom post type plugin which i have created. i have two doubt,,, the jquery script will work only on widget options (i.e) Sidebar. So when i use the ...
0
votes
1answer
59 views

Removed jQuery script from header.php , any problems?

To avoid multiple jQuery calling from my theme and plugins, I removed <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url'); ...
0
votes
1answer
78 views

How to prevent plugins from loading jQuery

I recently downloaded a free plugin from wordpress.I want to remove the plugin from loading jQuery because you experts know that it is already loading from wordpress header.php file. The plugin is ...
0
votes
0answers
39 views

wp_next_scheduled() with jQuery Countdown

I'm working with the jQuery Countdown timer for the first time and I wanted to integrate it into my Wordpress site to display the time until the next scheduled cron event. When the countdown has ...
0
votes
2answers
53 views

Jquery was not found on this server

I have two pages, events.php from plugin1 index.php from plugin2. in events.php. I am including jquery for ajax loading <script ...
0
votes
1answer
212 views

Ajax +wordpress onClick link redirect to new page and create html content

i have two pages in my wordpress plugin index.php charts.php in index.php i have some content and some link.. <a onclick="show_trend()" >Trend</a> while clicking this link ,i have ...
-1
votes
1answer
53 views

Loading jQuery library from WordPress admin

When we are developing Themes, we are taught to enqueue the jQuery library if necessary, because no jQuery library is available on the front-end of WordPress (if I'm not wrong). But when we are into ...
0
votes
1answer
44 views

Why this plugin is not working?

I am testing jQuery in my wordpress plugin. Two files 1. main_plugin.php 2. js_plugin.js (Both in the same directory HelloWorld). CODE: PHP FILE: <?php /* Plugin Name: jQuery Test Plugin Plugin ...
0
votes
1answer
75 views

Ajax, jQuery and Wordpress

I'm having trouble getting AJAX and jQuery to work with WP, and wondering if someone can point me in the right direction. I have a form, and I want to pass the data from the form to a PHP function, ...
0
votes
2answers
66 views

WP Plugin Running before jQuery

I'm having problems with jQuery and a plugin, the console error says jQuery is not defined. What I don't understand is it only fails when I load it to the production server, on my local dev ...
0
votes
1answer
71 views

Use options to control jQuery plugin

This may be a dumb question, but I've been teaching myself Wordpress and I've been struggling with this for a while. What I want to do is use a Wordpress control panel page to control a countdown ...
0
votes
1answer
364 views

insert query on a custom table using ajax with jQuery plugin Jeditable

I've read tons of post already but found no solution... I'm tryin to implement Jeditable functionality in a plugin with this code: jQuery(document).ready(function() { ...
0
votes
0answers
125 views

How do I call the dashboard's sortable javascript in a plugin page?

I want to create a multi-column sortable widget area in a plugin's settings page. In order to test this, I started by directly copying my dashboard's HTML content from <div ...
0
votes
0answers
48 views

Thumbnails to append content from database via ajax

Completely re-edited question: I am displaying music album covers as thumbnails in a page template. I would like to be able to click on an album thumbnail and pull the corresponding details for that ...
0
votes
1answer
17 views

How to get site homepage from plugin?

I am creating a plugin that has a preview, kind of like the theme customizer preview. It displays the users site in an Iframe. The issue is that I can't seem to be able to get the users homepage using ...
1
vote
3answers
186 views

Loading jQuery and jQuery plugin script files correctly [duplicate]

I am using a ticker jQuery plugin and having trouble loading my script files correctly. If I add the scripts in directly into the theme's header.php file my scripts work correctly. Example: ...
0
votes
1answer
22 views

jquery code didnt run on my plugin

I use this to hook my scripts and styles to my plugin add_action('admin_init', 'the_box_init' ); // Init plugin options to white list our options function the_box_init(){ register_setting( ...
0
votes
1answer
106 views

Execute Jquery when a specific page in my plugin is loading

I am building a plugin and I would like to be able to hide the wordpress admin side menu and top bar when a specific page is shown(or menu item clicked)? Should I call the jquery directly as a ...
0
votes
0answers
124 views

How can I include scripts in a jquery loaded page, for a jquery wordpress widget?

Iam writing a wordpress widget with the following pages 1) I have master page (master.php) - is the main plugin page - Loads a second page (slave.php) with jQuery 2) The slave page - has php, ...
0
votes
1answer
187 views

The Events Calendar Plugin - List View Background Colour Issue [closed]

I'm trying to look for some help, I've got a WordPress website that I'm working on. I'm using this plugin called The Events Calendar, but in List View, the background keeps showing in transparency... ...
0
votes
2answers
1k views

How to Add a .js file Only in one specific Page Dynamically to Head

I need to add some scrips for Google Maps only in my contact page and I do not want to populate it on all pages. I am not willing to create a custom header as well so I was thinking is there any way ...
0
votes
1answer
54 views

Admin-ajax.php is dying “0” without processing function

I am trying to learn how to process AJAX requests in Wordpress the correct way. To do this I am adapting this tutorial to create a super simple AJAX request to place the ID of a post (from a link) ...
0
votes
1answer
112 views

Do I require the use of nonce?

Im creating a visit/page views counter with ajax,jquery and php, I have been reading a few articles that recommend the use of nonces for data manipulation through ajax, however i am not sure if i need ...
0
votes
1answer
341 views

Thickbox in Plugin settings page?

I adding the default wordpress thickbox in the admin page to show some information inside the div. Everything seems ok when i click that link it appear in popup now <a class="thickbox" ...
0
votes
2answers
2k views

jquery & ajax sending data to php

In my jquery script I have; jQuery.ajax( ajaxurl, { action: 'lu_ajax', status: 'enabled' }, success: function (a) { alert(a) } In my file.php ...
0
votes
1answer
79 views

How to localize data array in plugin's option page

So i am localizing data saved in an array for my plugin's options, however the data is only localized in the front end, how can I localize data in the plugin's option page as well? The following is ...
0
votes
1answer
72 views

How to enqueue scripts in right way in a plugin?

I am developing a wordpress plugin and just came out with a problem with enqueue scripts. I want to enqueue JQUERY UI (.js) and (.css) in my plugin. Is it better to enqueue it from Google CDN or ...
0
votes
1answer
186 views

Cannot echo a JS variable to a jQuery plugin coming from wp_localize_script

Short version: I'm able to get a PHP variable into a JS file using wp_localize_script. On JS file i'm able to echo the variable using console.log, but I cannot get it echo into the jQuery plugin's ...
0
votes
1answer
116 views

sanitizing/escaping plugin options

I have a plugin with a few text boxes that save the data in a serialized manner, the array is localized and printed in website front end to display custom messages. However, I just noticed that you ...
-1
votes
1answer
1k views

How to fetch serialized data from wordpress options

I have the following serialized data in a wp option a:2:{s:5:"Title";s:11:"your title";s:7:"Message";s:20:"Hola testing testing";} I would like to return it to be used in a form, and show it also in ...
1
vote
1answer
158 views

Best approach to fetch data from wp options to js file or php file

I am creating my first ever plugin, as I am not a programmer, I have been following tutorials and reading the codex, etc. My plugin consist in showing a notice to users when certain conditions are ...
0
votes
2answers
1k views

Check if email address exists front end with AJAX in a plugin

I am pulling my hair out trying to figure this out. I have followed the wordpress codex here for AJAX: http://codex.wordpress.org/AJAX_in_Plugins All I keep returning is 0, I never get a 1. Any idea ...
0
votes
0answers
74 views

jQuery does not enqueue for my purpose… (before an inline script in the footer)

Following How to add a javascript snippet to the footer that requires jQuery I am trying to load jQuery before my script does stuff but it's not working. This is it working when I include jQuery ...
0
votes
0answers
69 views

get_option include <br /> in my adsense

As title said I saved in wp-options -> option_value a adsense code but when I try to display to website in the code I get some "<script type=\"text/javascript\"><!--<br ...
5
votes
2answers
2k views

How Do I Use jQuery UI In My Plugin

It's a sad day in the world when I Google something and it returns nothing. I am trying to use the default datepicker (or ANY datepicker at this point) and am unable to because of my lack of ...
2
votes
2answers
246 views

Get image URL from media library in input

On wp-admin/post.php?post=447&action=edit for example I have a link and an input. The link appears as follows: <a href="#" class="button insert-media add_media" data-editor="tj_image_url" ...
3
votes
2answers
2k views

Pass PHP variable to javascript

Is there any possibility to pass some PHP variables in javascript so I can use them later? Only in single.php. I heard about wp_enqueue_scripts but with that it is neccesary to declare a path to a JS ...
0
votes
1answer
272 views

Load php file with jquery in single.php

I implemented in my worpdress theme ios button switch and when someone click the button the script load a php file with the text: on or off Here is the code: <script type="text/javascript"> ...
1
vote
1answer
469 views

Plugin admin page meta_box toggle and order state not saving

I can't get the toggle state and open/close status of meta_boxes on my plugin admin page to be stored. The ajax response is always 0 I'm using meta boxes to hold sections of menu for a plugin. ...
1
vote
0answers
669 views

How to bind data-src attribute for the image in the post using jquery?

I'm trying to use foresight.js for responsive image in the wordpress blog. For that I have to add the data-src attribute in the place of src in the <img> tag. Or I have to get the url from the ...
1
vote
2answers
1k views

how to add Jquery script to one page?

What is the best practice to apply an individual script to a particular page? When I try to apply the script of the whole page it has problems with other plug-ins. Is there a rule of thumb? ...
3
votes
1answer
651 views

Help adding image upload functionality to widget

I am working on a small WordPress widget and I am trying to set it up where the user can upload an image. So far, the necessary scripts are loading but when I click the "Media Library Image" button ...
1
vote
1answer
86 views

Are there any scripts, classes, and/or functions built-in to WP for a plugin to export/import its saved data from wp_options?

In WordPress, are there any supported 'script plugins', Classes, and/or a WordPress function that will allow a plugin to use to export/import its own data from the database to a txt/json file? A way ...
2
votes
1answer
82 views

What is the difference between these two methods of writing $ instead of jQuery in WordPress [closed]

What is the difference between these two methods of writing $ instead of jQuery in WordPress (function($) { // $ Works! You can test it with next line if you like // console.log($); })( jQuery ); ...
1
vote
2answers
4k views

jquery document ready function not being called [closed]

For some reason I can't get the jquery document ready to fire for my plugin my javascript jquery(document).ready(function($) { alert("hello world"); $("#testdiv").text("hi"); }); the ...
0
votes
1answer
243 views

Loading Images from Javascript on the Front End

I'm getting some 404 errors on image paths in this plugin I'm building. I'm trying to build a plugin that has some Javascript and images (like a close icon and a progress bar) that I want to load on ...