Archived topic
Child theme template changes not working
4 replies · Started by Matt on May 11, 2020
Hi,
I'm probably missing something very obvious but perhaps someone could advise me.
I have a child theme installed and have already made successful changes to CSS. I'm now trying to make changes to post archive listings (specifically to remove the link from the date).
If I edit post-meta.php directly in GeneratePress, I can see the change applying as I would expect. However, if I create a copy of post-meta.php in /mychildtheme/inc/structure/post-meta.php, this seems to have no effect. The change does not appear.
What am I doing wrong?
If I'm not mistaken, Child's are loading these files from Parent Themes (via funktions.php) as they don't have an own file structure!
cheers
Hi there,
most changes to templates can be done using filters like this one here for removing links from the date:
https://docs.generatepress.com/article/generate_post_date_output/#remove-link-from-date
Simply add it to your Child theme functions.php
Let me know if that works for you
That works. Seems like a nice tidy solution, thanks David.
Filters are great - and for most things there is a filter available :)
Glad to be of help.