echo do_shortcode for Contact Form 7 from within dynamically loaded php file

From what you have shown, downloadform.php never loads WordPress, hence naturally do_shortcode() is not available. You need to implement your AJAX using this Codex article: http://codex.wordpress.org/AJAX_in_Plugins Another alternative I would suggest is loading the contact form in a hidden div during the initial page load and then display the hidden div when users click whatever … Read more

admin ajax php success returns 0

Add die(); to the end of the function handle ajax. Add return false; after jQuery.ajax function tw_pages_results() { //stuff die(); } jQuery(document).ready(function() { jQuery.ajax({ type : “post”, dataType : “html”, url : “<?php echo site_url(); ?>/wp-admin/admin-ajax.php”, data : {action : “tw_pages_results”, ‘page’:0, ‘itemsperpage’:<?php echo $item_per_page; ?>, nonce: “<?php echo $tw_pages_nonce; ?>”}, success: function(response) { jQuery(“#results”).html(response); … Read more

jQuery is not defined, working on local server but not online

Add this in functions.php instead of header.php function frontEnd_scripts() { wp_enqueue_script(“jquery”); wp_deregister_script(‘jquery.mobile’); wp_register_script(‘jquery.mobile’, (“//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.js”),array(‘jquery’)); wp_enqueue_script(‘jquery.mobile’); wp_register_style(‘jqm_css’,(‘//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.css’)); wp_enqueue_style(‘jqm_css’); } add_action(‘wp_enqueue_scripts’, ‘frontEnd_scripts’);

how to use wp_editor() here am getting empty result

Your syntax for passing the settings array is incorrect and also you have not specified the name for the textarea in the settings array which is why it returns you an empty alert. Syntax from WordPress Codex: wp_editor( $content, $editor_id, $settings = array() ); $content (string) (required) – Initial content for the editor $editor_id (string) … Read more

extra code in – blank jquery function

As per comments: this code is not doing anything. To find the culprit, first change your theme to a standard one to see if the theme is adding it. If yes, check header.php if it is hardcoded there or else functions.php for any instances of add_action(‘wp_head’…, where it might be lingering. If it’s not the … Read more

Does WordPress support Plupload chunking when uploading asynchronously?

To the best of my knowledge, no, the async-upload process on the WordPress side does not support chunking from plupload. You can find this code in /wp-admin/async-upload.php. To handle the uploaded file, it calls the wp_ajax_upload_attachment() function, in the ajax-actions.php file. This function refers directly to the PHP $_FILES array, meaning that the file would … Read more

need to override function in jquery.ui.datepicker.js

I haven’t tested this, but this should work and don’t forget to replace the jQuery selector with your own: $(function() { if(typeof jQuery.datepicker === ‘function’){ $( “.your_date_picker_field_selector” ).datepicker({ beforeShowDay: function (t) { var e = t.getDay(); return [e == 3, “”] } }); } }); Updated: Since, you are using contact form 7 datepicker addon, … Read more