How to edit a parent theme and save in child?
-
I am using Pro theme, but have inherited the website and do not have login credentials to ask on their forum. It’s a bit complicated, but I don’t think it’s theme-specific.
In the parent theme is the path
framework/legacy/functions/frontend/renew.php
In this file is the one line I want to edit. (I have edited it in the Parent theme and it works for my purposes, but I need to save it in my Child theme or I will lose my edit on next update.)
The code as it exists in that file:
if ( x_does_not_need_entry_meta() ) { return; } else { printf( '<p class="p-meta">%1$s%2$s%3$s%4$s</p>', $author, $date, $categories_list, $comments ); } } endif;
I simply want to remove the last two variables:
if ( x_does_not_need_entry_meta() ) { return; } else { printf( '<p class="p-meta">%1$s%2$s</p>', $author, $date, $categories_list, $comments ); } } endif;
I deleted them and saved the renew.php file in the same path in the Child theme, but that did not override the Parent theme.
I suspect I could put just this code into the Child’s function.php, but I’m not sure how.
Thank you for any help you can provide!
- The topic ‘How to edit a parent theme and save in child?’ is closed to new replies.