function.php in child theme (3 posts)

  1. AWN
    Posted 2 years ago #

    Hello Dears,
    I am have issue with my created child theme.

    I have created a child theme and it works good. But I want to replace a piece of code in function.php as a pluging called wp-paginate requires that.

    Now if I edit the functions.php in my theme parent folder, I believe it will be lost upon theme update.

    I am trying to either copy or create a functions.php in my child folder but in both cases facing error.

    I have read many threats/topics but didn't find satisfactory solution.

    Any directions/help is appreciated.
    Here is my website

  2. Michael
    Part-Time Forum Moderator
    Posted 2 years ago #


    - don't copy the full functions.php into the chid theme;
    - a new functions.php needs to start with <?php in the first line (absolutely nothing before that); and could end with ?> (absolutely nothing after that);
    - if you need to 'change' a function of the parent theme, this function needs to be 'pluggable' - http://codex.wordpress.org/Pluggable_Functions

    if you are referring to function pinboard_posts_nav() then that is 'pluggable', so you can just re-write (or copy/paste it and edit) the function in functions.php of the child theme.

  3. AWN
    Posted 2 years ago #

    Thank you very much.

    Still error.

    I have crated a functions.php and just added


    but it returned the following error.

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, cgiadmin@yourhostingaccount.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic