I have set up a child theme to make custom changes to my site without having them erased every time I update. One change is to remove a wrapper that displays the title of the page with a lot of white space around it in the "content-hero.php" file. The code from the parent file is:
<div class="hero <?php echo edin_additional_class(); ?>">
<?php if ( ! is_page_template( 'page-templates/front-page.php' ) ) : ?>
<?php the_title( '<div class="hero-wrapper"><h1 class="page-title">', '</h1></div>' ); ?>
<?php else : ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( 1 == get_theme_mod( 'edin_title_front_page' ) ) {
the_title( '<header class="entry-header"><h1 class="page-title">', '</h1></header>' );
}
?>
<div class="entry-content">
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'edin' ),
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
<?php edit_post_link( __( 'Edit', 'edin' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer>' ); ?>
</article><!-- #post-## -->
<?php endif; ?>
I simply comment all of this out in the parent file using <!-- -->
But every time I update the theme this will be erased. Is there a code I can put in the functions.php (or style.css) file in the child theme to prevent this from loading?