Performing a POST action on homepage goes to posts page

When posting a form, if you use ‘name’ as an input name then there seems to be a problem with submitting. Try changing: <input type=”text” name=”name” class=”form-contact__text” /> to: <input type=”text” name=”the_name” class=”form-contact__text” /> Also, best to give your submit button a more unique name in case it conflicts with any plugins/themes – then check … Read more

How to add and submit input fields using a shortcode?

You can create the shortcode like this: add_shortcode( ‘add_fields’, ‘input_fields’ ); function input_fields( $atts ) { if ( isset( $_POST[‘gg’] ) ) { $post = array( ‘post_content’ => $_POST[‘content’], ‘post_title’ => $_POST[‘title’] ); $id = wp_insert_post( $post, $wp_error ); } ?> <form method = “post”> <input type=”text” name=”title”> <input type=”text” name=”content”> <input type=”submit” name=”gg”> </form> … Read more

Using the WordPress selected() function

The selected function causes immediate output, it does not return a string. Therefore you can’t use it like that, in a string building mode. If you want it to return a string instead of immediately outputting the text, pass false to the $echo parameter. $string = ” <select name=”gender”> <option value=”male” ” . selected( $values[‘gender’] … Read more

Prevent page reload after ajax form submission

To solve this, you need to unbind the event that triggers the second AJAX request. You need to make sure that your unbind() function is called after the event binding has occurred. So why not just load it in the footer? One reason is that the other script that binds the event might be loading … Read more

How do I setup nested repeatable option fields?

Not a direct answer to your specific case but this will probably help you figure out how to do it. I found an article here: http://www.sutanaryan.com/jquery-duplicate-fields-form-submit-with-php/ which details the process of posting fields which can be repeated using jQuery. In his example he creates an HTML form: <form action=”process.php” method=”post”> <p class=”clone”> <label> Name: </label> … Read more

other shortcodes in Contact form 7 MAILS [closed]

WPCF7 incorporates more filters than used in the answer you already found. Analogously to that, the wpcf7_posted_data filter should do what you are looking for: function wpse73667_wpcf7_posted_data( $posted_data ) { $posted_data = do_shortcode( $posted_data ); return $posted_data; } add_filter( ‘wpcf7_posted_data’, ‘wpse73667_wpcf7_posted_data’ ); Note that this is an educated guess and untested. You can find all … Read more

Processing a subscription form with POST method?

This solution is based on a couple of WPMU Dev plugins: PopUp Pro and Mailchimp Integration. If you are WPMU Dev member then download and install them either from their Project pages or via the WPMU Dev dashboard in your WordPress admin interface. Most of the effort is in creating a custom style for the … Read more

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