Dynamic href link to Contact Page

If the contact page is identified solely by the associated template, you can query for a page with the template name in meta key _wp_page_template: $args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => 1, ‘meta_query’ => array( array( ‘key’ => ‘_wp_page_template’, ‘value’ => ‘contact_template.php’ ) ) ); $contact_page = new WP_Query( $args ); if( ! … Read more

How can I redirect this contact form to a specific permalink

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.

Trying do build a contact form

One way to accomplish this is to setup two pages, with two page templates, one with your form code and the other with your mail code. The form action would point to the permalink of the page whose template hosts the mail code. That said, I’d actually recommend using a plugin like Contact Form 7 … 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.

Mail function is not working

You are passing $email where there should be attachments. Look at wp_mail arguments. Also you have not defined $to variable which in your case i assume should be $email. Try this, $name = $_POST[‘cuf_sender’.$n]; $email = $_POST[‘cuf_email’.$n]; $subject= $this->o[‘subpre’].’ ‘.$_POST[‘cuf_subject’.$n]; $msg = $_POST[‘cuf_msg’.$n]; $extra=””; foreach ($_POST as $k => $f ) if ( strpos( $k, … Read more