RSS

Monthly Archives: September 2011

Send emails with multiple attachments using wordpress

// values are just samples…

$to = “$inq_email”;
$subject = “Form Inquiry”;
$headers = ‘From: John Martel ‘ . “\r\n”;
$target_path = array(WP_CONTENT_DIR . ‘/uploads/sample1.pdf’);
array_push($target_path, WP_CONTENT_DIR . ‘/uploads/sample2.zip’);

$message = “

Thank you {$inq_name} for your inquiry and we will contact you as soon as we reviewed your message.

“;

if(wp_mail($to, $subject, $message, $headers, $target_path)) { echo ‘email success’; } else { echo ‘did not send’; }

 
Leave a comment

Posted by on September 25, 2011 in Wordpress

 

Tags: , , , ,

Registering a custom menu on your wordpress theme

// Add this on function.php
add_theme_support( ‘menus’ );
register_nav_menus( array( ‘menu_name’ => __( ‘Menu Description’) ) );

//add this on your theme. example is header.php
wp_nav_menu( array( ‘theme_location’ => ‘menu_name’ ) );

 
Leave a comment

Posted by on September 12, 2011 in Wordpress

 

Tags: , , ,

 
Follow

Get every new post delivered to your Inbox.