store partent class-core.php in child theme functions.php

Home Forums Polyclinic store partent class-core.php in child theme functions.php

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #21683

    gugler
    Participant

    store partent class-core.php in child theme functions.php

    Hi,

    thank you for the great theme! I know it is not really your job but i made a little adaption in the class-core.php and now i wanted to put this (final class Polyclinic_Theme_Framework { .. }) into the child theme functions.php to overwrite it. The Problem is that I am getting a 500 Error. Do you have an idea what the problem could be?

    Greetings, Martin

    #21685

    Oliver Juhas
    Keymaster

    Hi Martin,

    Thank you, I’m glad you like the theme :)

    Please note that you should never edit (parent) theme files as you will loose your modifications once you update the theme. Use a child theme instead.
    Also, with my themes it is actually almost never needed to copy the whole parent theme file into your child theme. Also, files containing PHP classes are not even meant to be overridden in a child theme. My themes use more flexible approach by offering helpful action and filter hooks. They allow you to modify any aspect of the theme with as little code as needed, directly via your child theme‘s functions.php file only.

    Please provide more info about what you aim to achieve, so I can give you a more specific resolution tip ;)

    However, saying this, I’m not really sure if the error 500 could be caused by similar modification. But of course, everything depends on the code you’ve introduced.
    Try to put your WordPress website into debug mode so you know if there is any PHP error. And/or check your server log file for any PHP errors.
    You will be able to trace the error source and so apply appropriate fix.

    You may even want to check your PHP settings.

    Best regards,

    Oliver Juhas
    WebMan Design

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

You must be logged in to reply to this topic.