Child theme functions.php not working
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
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.
php wordpress wordpress-theming
add a comment |
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.
php wordpress wordpress-theming
add a comment |
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.
php wordpress wordpress-theming
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.
php wordpress wordpress-theming
php wordpress wordpress-theming
asked Apr 14 '17 at 20:58
sumanta.ksumanta.k
77212
77212
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
you can use this:
/*
Theme Name: Twenty Seventeen Child
Theme URL: http://hostinger-tutorials.com
Description: Twenty Seventeen Child Theme
Author: John Doe
Author URL: http://hostinger-tutorials.com
Template: twentyseventeen
Version: 1.0.0
Text Domain: twentyseventeen-child
*/
@import url("../kallyas_30.3.2017/style.css");
then use this code in functions.php
:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
you can read more from hostinger
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43419178%2fchild-theme-functions-php-not-working%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
you can use this:
/*
Theme Name: Twenty Seventeen Child
Theme URL: http://hostinger-tutorials.com
Description: Twenty Seventeen Child Theme
Author: John Doe
Author URL: http://hostinger-tutorials.com
Template: twentyseventeen
Version: 1.0.0
Text Domain: twentyseventeen-child
*/
@import url("../kallyas_30.3.2017/style.css");
then use this code in functions.php
:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
you can read more from hostinger
add a comment |
you can use this:
/*
Theme Name: Twenty Seventeen Child
Theme URL: http://hostinger-tutorials.com
Description: Twenty Seventeen Child Theme
Author: John Doe
Author URL: http://hostinger-tutorials.com
Template: twentyseventeen
Version: 1.0.0
Text Domain: twentyseventeen-child
*/
@import url("../kallyas_30.3.2017/style.css");
then use this code in functions.php
:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
you can read more from hostinger
add a comment |
you can use this:
/*
Theme Name: Twenty Seventeen Child
Theme URL: http://hostinger-tutorials.com
Description: Twenty Seventeen Child Theme
Author: John Doe
Author URL: http://hostinger-tutorials.com
Template: twentyseventeen
Version: 1.0.0
Text Domain: twentyseventeen-child
*/
@import url("../kallyas_30.3.2017/style.css");
then use this code in functions.php
:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
you can read more from hostinger
you can use this:
/*
Theme Name: Twenty Seventeen Child
Theme URL: http://hostinger-tutorials.com
Description: Twenty Seventeen Child Theme
Author: John Doe
Author URL: http://hostinger-tutorials.com
Template: twentyseventeen
Version: 1.0.0
Text Domain: twentyseventeen-child
*/
@import url("../kallyas_30.3.2017/style.css");
then use this code in functions.php
:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
you can read more from hostinger
answered Nov 25 '18 at 4:47
mbghimbghi
37
37
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43419178%2fchild-theme-functions-php-not-working%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown