Changes not working at child theme

Hey guys. I have this post: http://wordpress-100914-338778.cloudwaysapps.com/opening-day-new-records/

Where the post is in the following categories:

Homepage Highlight
Latest News

As a result, for the post meta information, it would typically show:

In Homepage Highlight, Latest News by support / September 6, 2017

I wanted it to say instead:

By support / September 6, 2017

Which means that the category elements are removed (In Homepage Highlight, Latest News) and the “by” is capitalized (By).

Therefore, I copied this file from the parent theme folder:

/public_html/wp-content/themes/pro/framework/functions/ethos.php

and placed it in the child theme folder as:

/public_html/wp-content/themes/pro-child/framework/functions/ethos.php

but it did not work under the child theme, so I had to push the update to the parent theme folder by overwriting the file.

Note, I retained the original in the parent theme folder under this name:

/public_html/wp-content/themes/pro/framework/functions/ethos.phpbkup

Now it is working. However, the problem is that I’d like for this to be in the child theme.

Can someone advise on what I did wrong here?

Thanks a lot in advance

Hi There,

Yes, what you did will not work. Copying certain files on the same folder on the child theme will only work for files on the view folder: /public_html/wp-content/themes/pro-child/framework/views.

For content on this folder functions files, we have to copy the entire function you have edited to functions.php file on your child theme.. Now copy the entire function x_ethos_entry_meta() functions on your child theme functions.php instead.

Hope this helps.