• Resolved ltoso

    (@ltoso)


    Hi,
    if i want to override certain parts of the post.php in child theme

    do i have to copy the entire post.php into my child theme folder main directory and then change it or there is a way to just append the file with another file created by me in child theme folder so that rest of the post.php gets updated when there is a parent theme update. is there another way where i can write a function to override in the post.php and i don’t have to copy the entire post.php so that it can get updated when the main parent theme gets updated

    plzz recommend

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ltoso

    (@ltoso)

    hi, i looked at wordpress help files and the solution is

    1) you can create classes inside your style.css that will overrise the classes defines in the parent CSS
    2) to change any file such as header in php you have to copy the entire file in the child theme so that your files get loaded instead of file from parent theme and make customization
    3) but in case of the functions file you can create your own functions in a blank functions.php in your child theme and your function file gets loaded before the parent function file.

    fs2o

    (@fs2o)

    I’m on the same boat. Managed to modify functions from different php files from my child theme’s functions.php, as long the original functions are attached to hooks.
    Still looking for more information though.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Re overriding the post.php in child theme’ is closed to new replies.