Overriding template_parts.php in a child theme
Description:
The following file neve/inc/views/template_parts.php can't be overwritten in a child theme.
User story:
A customer wants users to search for media files instead of posts on his website and he changed the following line in the theme(file mentioned above)
$thumb = get_the_post_thumbnail_url();
to
$thumb = wp_get_attachment_thumb_url( $attachment_id );
Alternatives:
N/A
Reference
https://secure.helpscout.net/conversation/1518609437/279392/
+1 https://secure.helpscout.net/conversation/1629561633/291992/
This customer is not happy with the heading tag for the post title being changed on the Blog page from H2 to H3 in Neve 3.0 skin(details here). She wanted to override it in a child theme, the same file neve/inc/views/template_parts.php but it doesn't work.
This is also a problem because, in our documentation about the Neve child theme, we advise users to copy the views folder in the child theme and edit the desired file, however, this approach doesn't work. Hopefully, we can find a solution, otherwise, at least the doc needs to be updated.
@stefan-cotitosu The doc applies to the views folder from the root of the theme, not the one inside the /inc directory.
Thank you for the clarification, I'll pay more attention next time 😀
Is it possible to add filters on the following lines?
https://github.com/Codeinwp/neve/blob/90e69233ca4ec4fefe826c86f1f4a1fb1f60d42d/inc/views/partials/post_meta.php#L276
https://github.com/Codeinwp/neve/blob/90e69233ca4ec4fefe826c86f1f4a1fb1f60d42d/inc/views/partials/post_meta.php#L286
We got a request on wordpress.org about this - https://wordpress.org/support/topic/child-theme-issue-18/. The user wants to change the link of the date and author.