Edit functions.php in child theme
Good morning,
I have a problem with my child theme and the file functions.php .
How do you change the functions.php of the child theme ?
When the functions.php is empty the site works .
But as soon as I add a little ' of code, like this:
[ CODE]
/ / WpMorphed - No Price Tag When empty
unhook_classipress_functions function () {
remove_action ( ' appthemes_before_post_title ' , ' cp_ad_loop_price ' ) ;
}
add_action ( ' init ' , ' unhook_classipress_functions ');
*
cp_remove_loop_price function () {
global $ post ;
if ( $ post -> post_type == ' page' | | $ post- > post_type == ' post ' ) return;
$ price = get_post_meta ( $ post - > ID , ' cp_price ' , true);
if ( empty ($ price) AND ( $ price > 0 )) {
? >
<div class="price-wrap">
<span class="tag-head"> </ span > <p class="post-price">
<? php if ( get_post_meta ( $ post - > ID , ' price' , true) ) cp_get_price_legacy ( $ post - > ID ) ;
else cp_get_price ( $ post - > ID , ' cp_price '); ? > < / p>
</ div>
<? php
Else { } ? >
<? php
}
}
add_action ( ' appthemes_before_post_title ' , ' cp_remove_loop_price ' ) ;
[/ CODE]
The site freezes and becomes all white .
Thank you,
Pascal