• I have a Trending Posts banner on top of my home page. I want to override it with my own trending posts php file from within my child theme. But, it’s not overriding.

    I cloned to my child theme inc/hooks/hook-front-page-banner-trending-posts.php and inc/hooks/hook-front-page-main-banner-section-1.php as well as inc/hooks/blocks/block-post-header-layout-1.php since they’re all involved in rendering the trending posts banner on the home page.

    Then, I’ve updated the functions in each of those files and added “child_” in their names. Finally, I also updated my child’s functions.php to remove the reference to parent’s functions and use the child ones instead.

    Unfortunately, the end result is that the entire header disappears, including not only the trending banner but also featured and exclusive banners. In my investigation, I found an extract in inc/template-functions.php which renders the entire header. It seems to be overriding my changes. When I remove all the child-level changes, the header is back but the trending banner is still the same.

    I’d prefer to stick to editing my child theme’s files instead of directly changing the parent theme. Anyone can help with my issue? I feel like I’m running in circles by now and I’m getting concerned whether CoverNews is really customizable in that regard.

Viewing 1 replies (of 1 total)
  • Hello,

    Removing the template won’t help you, you need to overwrite the function for that you might need the help of a WordPress expert.

    Thank you

Viewing 1 replies (of 1 total)
  • The topic ‘Unable to override template-functions.php’ is closed to new replies.