Child theme misbehaving question.

  • Anonymous


    I’ve managed to stay away from child themes until now. Haven’t needed them for the things I do.

    Today I found myself needing to modify a blogging plug-in. The support person submitted a piece of code to be included in the functions.php of the child theme.

    I went ahead and got the child theme template from Prasanna SP’s website and installed the folder and files and switched to the child theme. Other than losing my background, everything appeared to be working fine. (This is on the website, BTW)

    However, once I plugged the new code (seen below) into the functions.php file, the site wouldn’t come up, giving me an ‘internal service error #500’. Wouldn’t work at all until I went into the CPanel and deleted the child theme function.php, then restarted and changed back to the non-child theme.

    Since I’m not aware of the ‘magic’ that makes all these files work together, I just wanted to confirm with you guys that a bad piece of code might cause this reaction from the site. That way I can take it in whatever direction is deemed necessary. Please understand that I’m NOT asking you to fix someone else’s code. I just want to know if what I did today would cause the error I got so I can address it properly.



    add_filter( 'the_title', 'append_feed_title_to_post_title', 10, 2 );
    function append_feed_title_to_post_title( $title, $sep ) {
    $feed_title = get_post_meta( get_the_ID(), 'original_feed_title', true );
    if ( $feed_title && ! stristr( $feed_title, '(' . $feed_title . ')' ) ) {
    $title.=" ($feed_title)";
    return $title;



    Since this isn’t actually a “support” question, I put it in general talk.


    Syahir Hakim


    Did you add the opening <?php tag at the very beginning of the functions.php file?

Viewing 3 posts - 1 through 3 (of 3 total)

  • You must be logged in to reply to this topic.