How can I correctly POST to a WordPress page?
How can I correctly POST to a WordPress page?
How can I correctly POST to a WordPress page?
I guess I’m just too tired. This helped: <input type = “hidden” name = “page” value = “pluginname/pluginfile.php_pluginfunction ” />
Because WordPress loads jQuery in no conflict mode, $ is not accessible as a global variable. You need to explicitly use jQuery. jQuery(document).ready(function () { jQuery(“#login”).loginWidget({ partnerRef: 0000, }); }); If, like me, you want to use $ anyway, you can pass it to the ready function. jQuery(document).ready(function ($) { // you can use $ … Read more
Use jQuery and AJAX to get HTML
I suggest going with a slider plugin like Layer Slider or this http://www.wonderplugin.com/wordpress-slider/ . You’re right that a plugin search for this kind of topic has the potential to be endless, so look for customizability and extendability in the plugin. Similarly for going the DIY route. There’s no need to reinvent the wheel. Find a … Read more
why does included jquery always cause problems
value not saving in the form when dynamically creating an input
The normal practice is to generate URL on PHP side ( admin_url() ) and provide it to your script via localization functionality ( wp_localize_script() ). It is documented in Codex under Ajax on the Viewer-Facing Side.
Instead of if (is_admin()) add_action(‘admin_menu’, ‘add_custom_box’); use add_action(‘add_meta_boxes’, ‘add_custom_box’); The ‘add_meta_boxes’ hook is the correct one to add meta boxes. Other than that, as you mentioned correctly change the ‘post’ to ‘$my-custom-post-type’ and register the category taxonomy for that post type: register_taxonomy_for_object_type( ‘category’, ‘$my-custom-post-type’ )
Firstly I’d suggest wrapping your JS like this: (function ($) { $(document).ready(function(){ $(“#Yes”).click(function(){ $(“.apptype”).show(); $(“.specify”).hide(); }); $(“#No”).click(function(){ $(“.specify”).show(); $(“.apptype”).hide(); }); }); })(jQuery); You’re also enqueuing jQuery twice, and the above the above script twice…. and with your shortcode you don’t need to declare the DOCTYPE, or wrap your from in an HTML tag. I would … Read more