Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

25

When dealing with forms you need to make sure that your form doesn't have a few specific filed names like: name,day,month,year and I'm sure that a few more, so make your form fields names more specific like: contact_name,contact_day,contact_month,contact_year. in your case change name="name" to anything else.


11

Revisited and updated answer: We can't use the user_contactmethods filter to remove the website wrapper, because this piece is hardcoded in the user-edit.php file and not part of the filterable user contacts loop, generated by: wp_get_user_contact_methods( $profileuser ) Hiding it with CSS The website row element now got it's own .user-url-wrap class: ...


6

No need to write any code, Contact form 7 has features of Additional Headers in the Mail section. In that you just need to write the email's header inside the Additional headers textbox in Mail(Second Tab) section. Put this inside the Additional Headers textbox. Cc: [friend1-email], [friend2-email], [friend3-email], [friend4-email], [friend5-email] OR ...


5

I had the same exact problem. I had a successful plugin installation and successful test email, but Wordpress was still attempting to send mail via /usr/bin/sendmail. I confirmed this by checking my logs (/opt/bitnami/apache2/logs/error_log). To finally get up and running, I simply installed sendmail with the following commands: $ sudo apt-get update $...


4

If you are self-hosted, you won't have that button, as that is for Wordpress sites hosted by wordpress.COM See The difference between WordPress.com, WordPress, and WordPress.org Search for plugins for self-hosted Wordpress: http://wordpress.org/extend/plugins/search.php?q=contact+form&sort= http://wordpress.org/extend/plugins/contact-form-7/ is very ...


3

are you logged-in with all browsers? since add_action('wp_ajax_contact_form', 'ajax_contact'); only works for logged in users, so to fix it you need to change it: add_action('wp_ajax_nopriv_contact_form', 'ajax_contact'); if you want your function to work for visitors as well as users.


3

I resolved the problem with ob_ functions and DOMDocument. It's better than jQuery or CSS for protecting the form. I use this kind of solution every time when I can't access a part of HTML content through a hook. function remove_extra_field_profile() { $current_file_url = preg_replace( "#\?.*#" , "" , basename( $_SERVER['REQUEST_URI'] ) ); if( $...


3

Do not call your PHP files directly. This will break, because in some setups, the plugin directory might be located on another domain, and your file would operate without the WordPress context now. Use the current URL as form action URL (or admin-post.php), then test if the request is a POST request and handle the form submission. Then redirect back to the ...


2

Go to your WP admin section, and under Apperance, there should be a Theme Options section, see if there is a place to set the email there. If not, see if the developer has provided some documentation.


2

I also (ab?)use comments for "private" replies to posts, like product inquiries, suggestions, answers to contests, ... The advantage is that they are stored in the database and displayed in the interface without extra code from me (sometimes I add a filter to improve the formatting). Spam filtering and e-mail notifications are easy extras. I think it is ...


2

If you are unsure about something i wrote here: Please use a dictionary english/turkish. What do you think about it? Possible? Yes. when we reply to comment, wordpress will send that reply as e-mail. You will have to use some sort of comment notification for this. This would then send an e-mail if you posted a reply to the "comment". and we ...


2

Disable all other plugins. Use the default theme. Try again. If it doesn't send, try sending to a different (eg gmail) address. If that still doesn't work, verify that sendmail is installed. If it is, check and see if a basic sendmail php script will work. If that still doesn't work or sendmail isn't installed, you may need to contact your host regarding the ...


2

Ive done this before using both contact form 7 and Grunion Contact Form plugins, when using contact form 7 i created a new tag to send the email to the post author: //contact form 7 author email wpcf7_add_shortcode('author_email', 'wpcf7_expert_email_shortcode_handler', true); function wpcf7_expert_email_shortcode_handler($tag) { if (!is_array($tag)) ...


2

A) It's not a WP Question as long as it's not a specific plugin (link?). B) Do it with jQuery: var str = <?php echo $user_id.'etc.'; ?>; var container = jQuery( '#contact_form_popup_id' ).html(); jQuery( container ).text( str );


2

I agree with Eric, although I think postfix is even easier and won't require the symlink: $ sudo apt-get update $ sudo apt-get install postfix You'll be walked through configuration options for postfix then, but on every RedHat, Debian, Ubuntu, or Amazon Linux AMI I've used in the past couple of years, the OOTB setup of Postfix works just fine.


2

Probably the theme is using a page template. When you create a Contact page, on the right side, look for "Template" and select the Contact page template from the drop down menu.


2

First, you should know that a image like that is very easy to read by almost any OCR. The first one is much more hard to crack. Anyway, if you don't want to hack the existing plugin, you can use Really Simple Captcha, it looks exactly like that. In your form: <?php $captcha_instance = new ReallySimpleCaptcha(); $prefix = mt_rand(); $word = $...


2

If your form has been incorporated into WordPress as a page template, which I encourage, then get_permalink(8); // or 12 should do it. If not, then http://example.com/?p=8 and http://example.com/?p=12 should always work. http://example.com/?page_id=8 and http://example.com/?page_id=12 uses the proper parameter for pages but ?p= works fine when I test it.


2

<?php the_content(); ?> That's the function that displays everything you saved in Pages - > Contact Page. You just need to move that anywhere you would like. Just keep in mind the_content() must be between the while loop for it to work. <?php if (have_posts()) : while (have_posts()) : the_post(); ?> // Begins loop <?php endwhile; ?> // ...


2

Assuming there is no contact form plugin which matches your needs, the proper way to do it in wordpress is to write and add an appropriate page template to your theme which contains and handles your form. Once done you associate the page in which the form should be displayed with the page template and then your action path is simply "".


2

-- Append parent_ to all your top level options' values like: parent_Course A, parent_Course B -- Also add extra options with the value as "endparent" something like below structure parent_Course A: course 1 course 2 course 3 course 4 endparent parent_Course B: course 1 course 2 course 3 endparent Code: // contact us form - change out ...


2

Here's a Step by Step Guide to adding Javascript into Pages: Step 1: Log into WordPress Step 2: Navigate to whichever page you want to add the scripts onto. Step 3a: If you have some kind of Page Builder you'll need to click the "Basic Editor" button or something similar so you get the Default WordPress Editor which looks like this: Step 3b: Once you ...


2

The quick and dirty way (but less dirty than page by page edits) would be a shortcode: function my_sharpspring() { $str = <<<EOD <!-- SharpSpring Form for General Contact Form --> <script type="text/javascript"> var ss_form = {'account': 'MzQ3NTM0MwQA', 'formID': 'S0syMjA2SjLTTUsyMNE1STU10rVMNUvRNUk0NjCwMDS0SDM2AAA'}; ss_form.width = '...


2

<?php // number 9 will be user ID $all_meta_for_user = get_user_meta( 9 ); print_r( $all_meta_for_user ); // find the key that you want Array ( [first_name] => Array ( [0] => Tom ) [last_name] => Array ( [0] => Auger) [nickname] => Array ( [0] => tomauger ) [description] => etc.... ) // store it in a ...


2

If you are not looping all users and only want to get current user phone_number meta then you can try the below. $current_user_id = get_current_user_id(); $phone = get_user_meta($current_user_id,'phone_number',true); echo $phone; NOTE: This will work only for logged in user. Also Check phone_number meta_key. By default wordpress doesn't have such meta ...


2

WordPress has a shortcut for getting the current user ID, which it sounds like you need-- get_current_user_id(). Using that you should be able to get the information you need. The following is a proof of concept block of code that will check for the return values of the functions and apply some conditional logic in case you need to: $uid = ...


2

Sending an email from an address you don't own will mean you run into problems with countermeasures again email spoofing (e.g SPF), as you're effectively impersonating the user's email address to send your email. You could put the user email address as the name, but send the email from an address you own For contact form 7 an example would be to put in the ...


2

This theme downloads 2 folders with name kyma and spina. so, go to kyma\functions\customize where you get contact-widgets.php and change contact information there.


2

You don't need Postfix if you use an SMTP plugin like, for example, WP Mail SMTP. Such kind of plugins can send email from your Google account via SMTP. I have just checked it by stopping postfix and successfully sending an email via WP Mail SMTP. If no SMTP plugins are activated on your site, you definitely need system transport, which can be Postfix or ...


1

Expanding on @birgire's and justifying @Patricia Walton's answer, if you only add add_action('admin_head-user-edit.php','remove_website_row_wpse_94963'); it will only be gone from the page where admin is editing a profile. To also make it disappear when a user edits its own profile add also add_action('admin_head-profile.php','...


Only top voted, non community-wiki answers of a minimum length are eligible