WordPress live, custom text box validation, how to?

If you are looking for a shortcode like this: [question text=”What has four legs?” answer=”Horse” message=”Right answer!” messageid=”message1″ ] with output like this: then here is a very simple non-jQuery skeleton version: add_shortcode(‘question’,’question_func_wpse_88192′); function question_func_wpse_88192($atts, $content = null ){ extract( shortcode_atts( array( ‘text’ => ”, ‘answer’ => ”, ‘message’ => ‘Right answer!’, ‘messageid’ => ‘message’, … Read more

How to validate inputs with filter in register_setting callback

First of all I would recommend you to rename your function to wpPartSanitize_settings, because this function doesn’t validate anything. As it doesn’t validate anything, then you aren’t able to “inform” administrator that one input is invalid. Nevertheless, to create your hook for wpPartValidate_settings filter, just do it like this: add_filter( ‘wpPartValidate_settings’, ‘wpse8170_sanitize_settings’, 10, 2 ); … Read more

WordPressUser Submission Form

When you get those “headers already sent” messages, it is usually one of several things: You are echoing something when you shouldn’t be, which is any time before get_header on the front end. I can’t remember exactly where the window is on the backend. You are doing something that is triggering a warning or notice … Read more

contact form in template with jquery,validate and ajax

WordPress is running Jquery in noconflict mode. (WordPress Codex Reference) or read this brief article I posted some time ago. View it here. You need to replace: $(document).ready(function(){ With this: jQuery(document).ready(function($){ So all together, try this: jQuery(document).ready(function($){ $(“#contact_form”).validate({ rules: { name: “required”, email: { required: true, email: true }, message: “required” }, messages: { name: … Read more

Remove comments validation (remove filter?)

If you take a look in source the condition for this message is get_option(‘require_name_email’). You can control it in Settings > Discussion > Comment author must fill out name and e-mail. The programmatic way could be add_filter( ‘pre_option_require_name_email’, ‘__return_null’ );

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