Add error message on password protected page

The latest entered password is stored as a secure hash in a cookie named ‘wp-postpass_’ . COOKIEHASH. When the password form is called, that cookie has been validated already by WordPress. So you just have to check if that cookie exists: If it does and the password form is displayed, the password was wrong. add_filter( … Read more

Does WordPress have a “Form API”?

No, but it should 😉 There are several custom field class’s (backend). wpAlchemy : https://github.com/farinspace/wpalchemy Meta Box Script: https://github.com/rilwis/meta-box My-Meta-Box: https://github.com/bainternet/My-Meta-Box meta-box-class: https://github.com/corycrowley/meta-box-class Meta Boxes Class: https://github.com/Bakke/Wordpress-Custom-Meta-Boxes-Class For front-end forms, you probably best off with a plugin in Eugene Manuilov’s link.

What is an easy way to display a front-end user registration form?

Jeff Starr wrote a great tutorial on front-end registration, login and password recovery taking the similar approach as suggested by onetrickpony. So take this as a follow up to his answer and as another resource that might help you get it done: http://digwp.com/2010/12/login-register-password-code/ Now you have two examples how to code this yourself and trust … Read more

$_POST form request with admin-post

Maybe a little late but I stumbled on this when I was having issues figuring it out so thought I would supply what I found out for future people. I’ve found the basic principles are to have a hidden input named action and it’s value being a custom set identifier. For example <input name=”action” type=”hidden” … Read more

Contact form 7 select box different value-text than content-text in option [closed]

It looks like this is supported by Contact Form 7 natively, it’s just not very obvious on how to make it happen. Here’s a documentation page explaining the functionality: http://contactform7.com/selectable-recipient-with-pipes/ Basically, all you have to do is put the values like so: “Visible Value|actual-form-value” What comes before the pipe | character will be shown in … Read more

How to handle form submission?

You should use the wp_ajax or the wp_ajax_nopriv function. First of all you should put the the admin ajax url as the action attribute value in the submission form. <form id=”” action=”<?php echo admin_url(‘admin-ajax.php’); ?>” method=”post” class=”form” > That way the the form will be submitted to the admin-ajax.php by default (without JavaScript). You can … Read more

Contact Form on WordPress Sites?

Contact Form 7 is one of the most popular plugins to add a contact form to a WP blog. It supports multiple contact forms and you can add/remove fields as needed. Additional services such as reCAPTCHA and Akismet can be added. I use this on most of my blogs to power the contact features.

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