/** * Handle the Contact page form submission and email it to the site admin. */ function hc_handle_contact_submit() { if ( ! isset( $_POST['hc_contact_nonce'] ) || ! wp_verify_nonce( $_POST['hc_contact_nonce'], 'hc_contact_submit' ) ) { wp_safe_redirect( add_query_arg( 'contact', 'error', home_url( '/contact/' ) ) ); exit; } // Honeypot field: real users never fill this in. if ( ! empty( $_POST['hc_website'] ) ) { wp_safe_redirect( add_query_arg( 'contact', 'success', home_url( '/contact/' ) ) ); exit; } $name = isset( $_POST['name'] ) ? sanitize_text_field( wp_unslash( $_POST['name'] ) ) : ''; $email = isset( $_POST['email'] ) ? sanitize_email( wp_unslash( $_POST['email'] ) ) : ''; $message = isset( $_POST['message'] ) ? sanitize_textarea_field( wp_unslash( $_POST['message'] ) ) : ''; if ( empty( $name ) || empty( $message ) || ! is_email( $email ) ) { wp_safe_redirect( add_query_arg( 'contact', 'error', home_url( '/contact/' ) ) ); exit; } $to = get_option( 'admin_email' ); $subject = sprintf( '[Health Calculators] New contact message from %s', $name ); $body = "You have a new message from the Health Calculators contact form.\n\n" . "Name: {$name}\n" . "Email: {$email}\n\n" . "Message:\n{$message}\n"; $headers = array( 'Content-Type: text/plain; charset=UTF-8', "Reply-To: {$name} <{$email}>" ); $sent = wp_mail( $to, $subject, $body, $headers ); wp_safe_redirect( add_query_arg( 'contact', $sent ? 'success' : 'error', home_url( '/contact/' ) ) ); exit; } add_action( 'admin_post_hc_contact_submit', 'hc_handle_contact_submit' ); add_action( 'admin_post_nopriv_hc_contact_submit', 'hc_handle_contact_submit' ); How to Calculate Your Macros for Weight Loss

How to Calculate Your Macros for Weight Loss

Counting calories gets you halfway to your goals. Counting macros – protein, carbohydrates, and fat – gets you the rest of the way, because where your calories come from affects hunger, muscle retention, and how sustainable your diet feels.

Start With Your Calorie Target

Before you can split calories into macros, you need a daily calorie target based on your Total Daily Energy Expenditure (TDEE) and your goal. For weight loss, a deficit of roughly 300-500 calories below TDEE is a reasonable starting point.

Prioritize Protein First

Protein is the macro to set first, not last. It preserves lean muscle during a calorie deficit and keeps you fuller for longer. A common target is around 0.7-1 gram of protein per pound of body weight, adjusted based on activity level and how much muscle you’re carrying.

Balance Fat and Carbohydrates

Fat supports hormone production and shouldn’t drop too low – most people do well keeping fat around 20-30% of total calories. Whatever calories remain after protein and fat are allocated go to carbohydrates, which fuel workouts and daily activity.

Adjust Based on Results

Macros aren’t set-and-forget. Track your progress for two to three weeks, then adjust based on how your weight, energy, and hunger levels respond. Small, consistent tweaks work better than large swings.

Skip the manual math with our free Macro Calculator – it factors in your TDEE and goals to generate a personalized protein, carb, and fat breakdown in seconds. Pair it with our Protein Intake Calculator to fine-tune your protein target.