Can I use custom CSS and js plugin to put JavaScript in to validate my forms
Can I use custom CSS and js plugin to put JavaScript in to validate my forms
Can I use custom CSS and js plugin to put JavaScript in to validate my forms
Wrap the call in an isset() conditional in this line: <input id=”cpt_theme_options[cpt_sm_dribbble_handle]” class=”regular-text” type=”text” name=”cpt_theme_options[cpt_sm_dribbble_handle]” value=”<?php esc_attr_e($options[‘cpt_sm_dribbble_handle’]); ?>” /> Try something like this: $cpt_sm_dribbble_handle = ( isset( $options[‘cpt_sm_dribbble_handle’]) ? $options[‘cpt_sm_dribbble_handle’]) : ” ); <input id=”cpt_theme_options[cpt_sm_dribbble_handle]” class=”regular-text” type=”text” name=”cpt_theme_options[cpt_sm_dribbble_handle]” value=”<?php esc_attr_e($cpt_sm_dribbble_handle); ?>” /> EDIT Note: your other alternative is to set default options on init, so … Read more
You can check my tutorial for front-end user registration and login in WordPress: http://www.cozmoslabs.com/1012-wordpress-user-registration-template-and-custom-user-profile-fields/ As to the wp_signon, wp_insert_user, wp_create_user and wp_update_user they take care of all sanitation and validation of your content. Also you don’t need to use those filters in wp_create_user to create your users.
Ok, after searching a while, I’ve found out that the “easy” solution to my problem would be to start by creating tabs (like in the appearence menu) and option sections. While I’m still no expert in that matter, I followed this 3 part guide that explains pretty much everything related to the matter. I just … Read more
THE ANSWER Well as it happens many times in my life – i found the answer myself. For people who struggles as me here the answer: $post[‘errors’][‘field_name’][‘errors’][] = __(‘Error text here.’); if you do that – error text will be displayed at the bottom of that field. In my case this doesn’t work because i’m … Read more
Your sanitize_callback function should not return false or null indicating that input is not valid – its intent is to always return a valid value. The value returned by this function is what will be save to the database, so in order for it to actually sanitize anything it will have to return something that … Read more
You are sending text unencoded. urlencode that just like you do the permalink. <a class=”popup” href=”http://twitter.com/share?url=<?php echo urlencode(get_permalink($post->ID)); ?>&text=<?php echo urlencode(the_content_limit(100, “”));?>”><img src=”http://zitatezumnachdenken.com/wp-content/uploads/2013/04/twittersmall.png” alt=”twitter”></a> Although, the_content_limit looks like it probably echos (based on your usage) instead of returning a string, which you will need. So I expect you will have to find that function and … Read more
If you are just wanting a simple “login” you could use htpasswd and htaccess. WordPress sites already have the htaccess in the main directory. Add an .htpasswd file at the same level as your root HTML folder. Example: . ├── public_html | └── wordpress | └── .htaccess └── .htpasswd Use a tool like htpasswd generator … Read more
Right, so it will simply do its best to close any unclosed tag – that’s it. Nothing more. As you can see if you look at the source code, all the function does is make sure to balance out the tags that might not be. It’s also explained in the codex. (“force_balance_tags” is the real … Read more
Code goes in function.php file of your active child theme (or active theme). It could works. add_filter( ‘woocommerce_billing_fields’, ‘woo_filter_state_billing’, 10, 1 ); function woo_filter_state_billing( $address_fields ) { $address_fields[‘billing_state’][‘required’] = true; return $address_fields; } add_filter( ‘woocommerce_shipping_fields’, ‘woo_filter_state_shipping’, 10, 1 ); function woo_filter_state_shipping( $address_fields ) { $address_fields[‘shipping_state’][‘required’] = true; return $address_fields; }