WordPress: redirecting to the form page after form submission to admin-post.php
WordPress: redirecting to the form page after form submission to admin-post.php
WordPress: redirecting to the form page after form submission to admin-post.php
You can look into comment_form() function. You can modify your fields and pass into this function to generate the comment form. Typically it is used within comments.php file.
How do I send the contents of a form to deliver to the already existing custom field in the wordpress theme
How can I receive uploaded attach file as a Google drive link [closed]
ahh nvm, sorted it: jQuery(document).ready(function($){ $(‘.addtocart’).submit(function(){ var data = {action: ‘my_special_action’,post:$(‘.addtocart’).serialize() }; $.post(“<?php echo admin_url(‘admin-ajax.php’); ?>”, data, function(response){ $(“.eshopajax”).insertAfter(this).fadeIn(100).html(response).fadeOut(3000); setTimeout (clearCart,200); setTimeout (doRequest,500); setTimeout (clearRequest,3000); }); function doRequest(){ var tdata = {action: ‘my_cart’}; $.post(“<?php echo admin_url(‘admin-ajax.php’); ?>”, tdata, function(response){ $(“.ajaxcart”).insertAfter(this).fadeIn(100).html(response); }); } function clearRequest(){ $(“.eshopajax”).empty(); } function clearCart(){ $(“.ajaxcart”).insert(); } return false; }); });
The WordPress Setting API should provide everything you need, it even automatically stores values IIRC. As buddypress is built on top of WordPress I assume this work for buddypress as well.
You should (and must for security) use validation function, that is part of Settings API. I don’t seem to see it in your code. There you should be able to simply pass empty value for option under circumstances it should be saved as disabled. Of course you can also just use regular Options API functions … Read more
I think you’ve more or less got what you need. You’ve got a textfield in an HTML form. That form needs to sit in a template file somewhere in a WordPress theme. This template file generates uncached pages. Inside the PHP template for said template file, check the $_POST (or $_REQUEST) object for the form … Read more
Currently you are passing on this value: ‘post_category’ => array(‘3,4,5’) // This is a single string While you should be doing this: ‘post_category’ => array(3,4,5) // Three separate values Don’t forget to sanitize the POST values neither: // Initialize categories $post_category = array(); // Prevent “undefined variable” error notices if (isset($_POST[‘vtype’])) { // Loop over … Read more
I don’t have hands-on experience with such use case, but my first suggestion would be to heck out plugins tagged wiki in official repository.