A mandatory agreement form to access another page?

I would use a shortcode for this. Wrap the content you want behind the “terms_required” shortcode, if the user hasn’t agreed to the terms, show them the form. The form would submit to a custom rewrite rule (url endpoint) that validates the form and sets a cookie if everything checks out. Let’s start by wrapping … Read more

Remove field in the form : only works for “url”, not for “email”?

This works fine for me: <?php add_filter(‘comment_form_default_fields’, ‘wpse53687_filter_fields’); /** * Unsets the email field from the comment form. */ function wpse53687_filter_fields($fields) { if(isset($fields[’email’])) unset($fields[’email’]); return $fields; } One reason that it could be failing on your theme is that args were passed into comment_form. Specifically, the theme author passed in a fields key into the … Read more

Saving frontend form data in wordpress

Also, how are you processing your image upload? That function only sets the enctype. By adding the following beneath your call to wp_insert_post you will be able to process your image upload, if (!function_exists(‘wp_generate_attachment_metadata’)){ require_once(ABSPATH . “wp-admin” . ‘/includes/image.php’); require_once(ABSPATH . “wp-admin” . ‘/includes/file.php’); require_once(ABSPATH . “wp-admin” . ‘/includes/media.php’); } if ($_FILES) { foreach ($_FILES … Read more

Is there a way to embed a Google Docs form in a page without using plugins?

No, that’s not possible. You can find a list of providers for embeddable coontent in wp-includes/class-oembed.php: ‘#https?://(www\.)?youtube.com/watch.*#i’ ‘http://youtu.be/*’ ‘http://blip.tv/*’ ‘#https?://(www\.)?vimeo\.com/.*#i’ ‘#https?://(www\.)?dailymotion\.com/.*#i’ ‘#https?://(www\.)?flickr\.com/.*#i’ ‘#https?://(.+\.)?smugmug\.com/.*#i’ ‘#https?://(www\.)?hulu\.com/watch/.*#i’ ‘#https?://(www\.)?viddler\.com/.*#i’ ‘http://qik.com/*’ ‘http://revision3.com/*’ ‘http://i*.photobucket.com/albums/*’ ‘http://gi*.photobucket.com/groups/*’ ‘#https?://(www\.)?scribd\.com/.*#i’ ‘http://wordpress.tv/*’ ‘#https?://(.+\.)?polldaddy\.com/.*#i’ ‘#https?://(www\.)?funnyordie\.com/videos/.*#i’ ‘#https?://(www\.)?twitter.com/.+?/status(es)?/.*#i’ ‘#https?://(www\.)?soundcloud\.com/.*#i’ ‘#https?://(www\.)?slideshare.net/*#’ ‘#http://instagr(\.am|am\.com)/p/.*#i’ Google is not in that list, so you have to ask the administrator.

Make editor required for post from frontend

You can add a filter to the editor html add_filter( ‘the_editor’, ‘add_required_attribute_to_wp_editor’, 10, 1 ); function add_required_attribute_to_wp_editor( $editor ) { $editor = str_replace( ‘<textarea’, ‘<textarea required=”required”‘, $editor ); return $editor; }

page shows 404 on form submit

i putting something else in action? Yes. The complete path to the file. If your site is http://mysite.com and you are on the home page then you are requesting a file at http://mysite.com/result.php. If you are on a date archive you’d be requesting a file at http://mysite.com/2013/03/03/result.php. The file you want is actually at http://mysite.com/wp-content/themes/theme-name/result.php. … Read more

What form element names break wordpress?

You should definitely avoid the public WordPress query vars: attachment attachment_id author author_name cat category_name comments_popup day error feed hour hour m minute monthnum name p page_id paged pagename post_parent post_type preview second static subpost subpost_id tag tag_id tb w year There’s also this list of reserved terms, inexplicably located on the register_taxonomy page, with … Read more

Ajax contact form return 0

Your javascript is missing an action parameter with the data: $.post(action, { name: $(‘#name’).val(), email: $(‘#email’).val(), phone: $(‘#phone’).val(), subject: $(‘#subject’).val(), comments: $(‘#comments’).val(), verify: $(‘#verify’).val(), action: ‘ajaxContacForm’ // <– added action here }, function(data){ document.getElementById(‘message’).innerHTML = data; $(‘#message’).slideDown(‘slow’); $(‘#contactform img.loader’).fadeOut(‘slow’,function(){$(this).remove()}); $(‘#submit’).removeAttr(‘disabled’); if(data.match(‘success’) != null) $(‘#contactform’).slideUp(‘slow’); } );

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