在我的 wordpress 应用程序中意外删除了 home.php 文件中的代码如何恢复它
Accidentally deleted code inside home.php file ony my wordpress app how to restore it
我正在使用一页 wordpress 主题,在 home.php 我不小心删除了一些代码,在 wordpress 内部没有撤消按钮(不知道为什么)所以我如何重写它以使其工作或以某种方式 return 它回来了
这是我现在的代码
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
get_header();
?>
/* HERE DELETED SOME STUFF NOW CANT RETURN IT */
<?php
get_footer();
如果您下载主题(来自 https://wordpress.org/themes/one-page/)并查看 home.php 文件,它包含以下内容:
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
get_header();
?>
<!--Including sliders section -->
<?php echo get_template_part( 'templates/homepage', 'sliders' ); ?>
<!--/Including sliders section -->
<?php
onepage_section_show();
?>
<?php
get_footer();
我正在使用一页 wordpress 主题,在 home.php 我不小心删除了一些代码,在 wordpress 内部没有撤消按钮(不知道为什么)所以我如何重写它以使其工作或以某种方式 return 它回来了
这是我现在的代码
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
get_header();
?>
/* HERE DELETED SOME STUFF NOW CANT RETURN IT */
<?php
get_footer();
如果您下载主题(来自 https://wordpress.org/themes/one-page/)并查看 home.php 文件,它包含以下内容:
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
get_header();
?>
<!--Including sliders section -->
<?php echo get_template_part( 'templates/homepage', 'sliders' ); ?>
<!--/Including sliders section -->
<?php
onepage_section_show();
?>
<?php
get_footer();