Javascript Wordpress子主题的更改将永远持续

Javascript Wordpress子主题的更改将永远持续,javascript,php,css,wordpress,Javascript,Php,Css,Wordpress,我设置了一个儿童主题,并使其正常工作。然而,现在每当我做出任何改变,它们都会在几个小时内不会在网站上反映出来。它们最终会更新,但直到很长一段时间后才会更新 而且,我还应该说我没有缓存插件,我已经清除了浏览器缓存 当我从子主题切换到父主题时,旧的css和javascript就会消失。而且,当我再次激活子主题时,旧的css和javascript会重新出现,但没有任何新的更改 下面是我的child function.php文件代码: <?php //* Code goes here funct

我设置了一个儿童主题,并使其正常工作。然而,现在每当我做出任何改变,它们都会在几个小时内不会在网站上反映出来。它们最终会更新,但直到很长一段时间后才会更新

而且,我还应该说我没有缓存插件,我已经清除了浏览器缓存

当我从子主题切换到父主题时,旧的css和javascript就会消失。而且,当我再次激活子主题时,旧的css和javascript会重新出现,但没有任何新的更改

下面是我的child function.php文件代码:

<?php
//* Code goes here

function my_theme_enqueue_styles() {

$parent_style = 'zero'; // This is 'zero-style' for the Zero theme.

wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
    get_stylesheet_directory_uri() . '/style.css',
    array( $parent_style ),
    wp_get_theme()->get('Version')
);
}

add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );

function zero_child_script() {
  wp_enqueue_script('zero child script', get_stylesheet_directory_uri() . '/zero_child_script.js');
}
add_action('wp_enqueue_scripts', 'zero_child_script');
网址是

我还尝试根据这篇文章修改.htaccess重写规则 ()
查看是否修复了它,但它不起作用。

是否尝试使用管理员编辑器?。你是在用FTP上传文件吗?@vel我实际上两个都试过了,但都没有效果。当我在chrome开发工具中查找它时,我可以看到旧的设置。您是否检查了文件权限?是否尝试使用管理编辑器?。你是在用FTP上传文件吗?@vel我实际上两个都试过了,但都没有效果。当我在chrome开发工具中查找它时,我可以看到旧的设置。你检查了文件权限了吗?
/*
 Theme Name:   Zero Child
 Theme URI:    
 Description:  A Child them of The Zero Creative theme for WordPress OpalTeam is a fully responsive theme that     looks great on any device. That's the best for any kind of crowdfunding     online sites. Follow us on Themeforest to     receive newest updates</a>
 Author:       The Opal Wordpress Team
 Author URI:   http://
 Template:     zero
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         black, green, white, light, dark, two-columns, three- columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout,  custom-background, custom-header, custom-menu, editor-style, featured- images, flexible-header, full-width-template, microformats, post-formats,  rtl-language-support, sticky-post, theme-options, translation-ready,  accessibility-ready
 Text Domain:  zero-child
*/

/*Glossary

1. Header Styles
2. Slider Styles

*/

/*=====1. Header Styles=====*/

@media only screen and (min-width: 1230px) {

  .logo-wrapper {
    width: 35% !important;
        -webkit-transition: all .5s ease;
        -moz-transition: all .5s ease;
        -ms-transition: all .5s ease;
        -o-transition: all .5s ease;
        transition: all .5s ease;
      }

    }

/*=====2. Slider Styles=====*/

h1#type-text {
  text-shadow: 0 0 20px rgba(0,0,0,0.5);
}
//Add background to logo on scroll

function ScrollBg(){
  var bg = document.getElementsByClassName('logo-wrapper')[0];
  var ypos = window.pageYOffset;
  var screenWidth = '1229';

  if (window.screen.width > screenWidth) {
    if (ypos > 589) {
      bg.style.backgroundColor = "rgba(0,0,0,0.5)";
    }
    else{
      bg.style.backgroundColor = "rgba(0,0,0,0)";
    }
  }
}

window.addEventListener("scroll", ScrollBg);