Child theme functions.php not working

I created a wordPress child theme but after activate the site shows 500 Error and admin page showing blank.
here is my code:

/*
Theme Name:   WP Kallyas Child Theme
Theme URI:    http://www.wpbeginner.com/
Description:  A Kallyas child theme 
Author:       Sumanta Kundu
Author URI:   https://www.upwork.com/freelancers/~01b606f18d998a5fb2
Template:     kallyas_30.3.2017
Version:      1.0.0
*/
@import url("../kallyas_30.3.2017/style.css");

And functions.php code goes here:

if(isset($_POST['submit_wp_buttons_settings'])){
save_plugin_data_meta_table();
}
 if ( isset( $_POST['btn_save_send_data_email'] ) ) {
$current_user = wp_get_current_user();
$admin_email = get_option( 'admin_email' );
$current_url="//".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$contact_errors = false;
    // get the posted data
    $name = $_POST["name"];
    $email_address = $_POST["email"];
    $messagee = $_POST["messagee"];
    $price = $_POST["price"];
    $txt_txt = $_POST['txt_txt'];
    // write the email content
    $header .= "MIME-Version: 1.0n";
    $header .= "Content-Type: text/html; charset=utf-8n";
    $header .= "From:" . $email_address;
    $message = "Name: $name <br/>";
    $message .= "Email Address: $email_address <br/>";
    $message .= "$txt_txt: $price <br/>";
    $message .= "Message: <br/> $messagee <br/>";
    $message .= "Product Url: <br/> $current_url";
    $subject = "$txt_txt - ww2badges";
    $subject = "=?utf-8?B?" . base64_encode($subject) . "?=";
    $to = $admin_email;
    // send the email using wp_mail()
    if( !mail($to, $subject, $message, $header) ) {
        echo '<script>alert("Failed");</script>';
        echo '<script>window.location.href="'.$current_url.'"</script>';
    } else {
        echo '<script>alert("Email has been sent to admin.");</script>';
        echo '<script>window.location.href="'.$current_url.'"</script>';
    }
 }
 if ( isset( $_POST['not_logged_in'] ) ) {
echo '<script>alert("You should login first.");</script>';
echo '<script>window.location.href="'.site_url().'/wp-login.php"</script>';
}
if ( isset( $_POST['starting_price_btn'] ) ) {
send_starting_bid_email_to_admin();
}

Please help me I am newbie in WordPress.I also added this code to my plugin but same problem.

Read more here: Child theme functions.php not working

Leave a Reply

Your email address will not be published. Required fields are marked *