Results 1 to 2 of 2

Thread: Edit functions.php in child theme

  1. #1
    Thread Starter
    comproevendo's Avatar
    Join Date
    Jul 2013
    Location
    Switzerland
    Posts
    52
    Thanks
    2
    Thanked 0 Times in 0 Posts

    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

  2. #2
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Rolf Hassel (Samcy)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Child Theme Functions & Hooks
    By lucrothe in forum Vantage General Discussion (Legacy)
    Replies: 0
    Last Post: May 23rd, 2013, 11:56 PM
  2. Child theme functions
    By benkovic in forum Vantage General Discussion (Legacy)
    Replies: 10
    Last Post: May 8th, 2013, 08:15 AM
  3. Dimitris Vantage functions php & child-theme
    By tbase in forum Help Using Vantage (Legacy)
    Replies: 6
    Last Post: March 26th, 2013, 04:22 PM
  4. [SOLVED] functions.php for child-theme
    By lunovis in forum Report JobRoller Bugs
    Replies: 2
    Last Post: November 15th, 2012, 09:14 AM
  5. theme-functions.php not working inside child theme folder
    By jobortunity in forum JobRoller General Discussion
    Replies: 6
    Last Post: November 6th, 2012, 04:24 AM