jQuery Validate wp_editor

Per the jQuery noConflict Wrappers section of the wp_enqueue_script() Codex page, the $ variable is not available in WordPress. You can replace $ with jQuery in your jQuery code, or do something like this: jQuery(document).ready(function($) { // your code here . . . });

add function to saving change on Options Pages

To execute a task after a option has been updated, you can use updated_option action hook: add_action( ‘updated_option’, ‘updated_option_callback’, 10, 3 ); function updated_option_callback( $option, $old_value, $value ) { //Do something } Also, you can use update_option_{option-name} specifically for each option. For example: add_action( ‘update_option_new_option_name’, ‘update_new_option_name_callback’, 10, 2 ); function update_new_option_name_callback( $old_value, $value ) { … Read more

Custom WordPress+PHP+MYSQL+AJAX form, submit event not captured by Javascript, but does POST data to the DB

If you’re releasing this as a plugin, you absolutely must use the AJAX API. It’s super easy: /** * Handle the request and return the result. */ function alumni_process_request() { global $wpdb; // All your processing code from your original question, except for loading WordPress! return $data; } /** * AJAX handler for the “alumni” … Read more

How to replace a javascript select box onchange event to a form submit action?

It’s not working because: You are redirecting home You don’t listen for the $_GET variable so the archive link is just appended to your home url You need to add a function that listens for that $_GET variable. just add this to your functions.php file add_action( ‘template_redirect’, ‘wpse_archive_select’ ); function wpse_archive_select(){ if( isset( $_GET[ ‘archive-dropdown’ … Read more

Datepicker not supporting timepicker

WordPress supports only datepicker. If you want to add timepicker in datepicker you have to use jquery-ui-timepicker-addon as extension in your theme or plug-in. Add css and js as below add_action(‘wp_enqueue_scripts’, ‘custom_datepicker’); function custom_datepicker() { //wp_enqueue_script(‘jquery-ui-datepicker’); //wp_enqueue_script(‘jquery-ui-core’); wp_enqueue_script(‘jquery-ui-timepicker-addon’,get_stylesheet_directory_uri().’/js/jquery-ui-timepicker-addon.js’,array()); wp_enqueue_style(‘jquery-ui-timepicker-addon’,get_stylesheet_directory_uri().’/css/jquery-ui-timepicker-addon.css’,array()); wp_enqueue_style(‘jquery-ui’,get_stylesheet_directory_uri().’/css/jquery-ui.css’,array()); } You can download all css and js files from this link http://trentrichardson.com/examples/timepicker/ Call timepicker … Read more

Registration e-mail check with AJAX

You have missed few things in your ajax. Please find following updated code which will help you to solve your problem function add_ajaxurl_cdata_to_front(){ ?> <script type=”text/javascript”> //<![CDATA[ ajaxurl=”<?php echo admin_url( “admin-ajax.php’ ); ?>’; //]]> </script> <?php } add_action( ‘wp_head’, ‘add_ajaxurl_cdata_to_front’, 1); add_action( ‘wp_footer’, ‘add_js_to_wp_footer’ ); function add_js_to_wp_footer(){ ?> <script type=”text/javascript”> jQuery(‘document’).ready(function(){ jQuery(‘#reg_email’).on(“change”,function(){ jQuery.ajax({ type: ‘POST’, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)