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

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; }

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

Grab values from the query string to fill in hidden fields in ninja forms [closed]

It looks like you can use the ninja_forms_display_init action to populate a field. To get the job ID from the URL you mentioned above you can use the $_GET array. Adapting the code from that documentation page, something like this should achieve what you’re looking for: function wpse_158000_populate_field($form_id) { global $ninja_forms_loading; $job_id_field = 3; //put … Read more

How dynamically change wp_mail behaviour, sending html or plain text based on conditions?

Here’s an (untested) PHPMailer example to check for e.g. the subject and the content type: function mailer_config( PHPMailer $mailer ) { if( ‘Subject #1’ === $mailer->Subject && ‘text/html’ !== $mailer->ContentType ) { $mailer->IsHTML( true ); } } other options would be to e.g. check the $mailer->From or $mailer->FromName, or some other conditions, depending on your … Read more

Embed interactive pdf

How did you tried to embed them? Is it post or page? My solution would be to add it into an iframe , add code below as html to your page/post. <iframe frameborder=”1″ height=”200″ name=”frame1″ scrolling=”yes” src=”http://download.belastingdienst.nl/belastingdienst/docs/aangifte_bpm_verzoek_teruggaaf_bpm_bpm0162z3plfol.pdf” width=”550″></iframe> you should change the width and height accordingly ofcourse. Let me know if it worked.

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