我已经设置了一个子主题,可以对我的网站进行自定义更改,而不会在每次更新时将其删除。一个更改是删除一个包装器,该包装器在“content hero.php”文件中显示页面标题,周围有大量空白。父文件中的代码为:
<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; ?>
我只需在父文件中使用<;!----&燃气轮机;
但每次我更新主题时,它都会被删除。是否有我可以在函数中输入的代码。子主题中的php(或style.css)文件来阻止加载?