Title: Child theme problem
Last modified: October 31, 2021

---

# Child theme problem

 *  [webcart](https://wordpress.org/support/users/webcart/)
 * (@webcart)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/child-theme-problem-32/)
 * Hi,
    On a new (old) site I am working on now, I get a strange behavior with the
   Child theme. Theme customize stopped to save the changes with the message to 
   try again later, The theme editor not saving files with the message to try SFTP
   and now I am also cannot edit pages in Elementor – page is loading and nothing
   happens. I tried to disable plugins but nothing was changed until I activated
   Astra parent theme instead of Astra Child theme that was activated. Then all 
   started to work fine. I tried to download a new child theme with your online 
   child theme generator and when I upload it, it works at the beginning well but
   then again, same problems. Hosting is in Cloudways and I already contacted with
   them. They tried several ways without any solution and advice to contact Astra.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [webcart](https://wordpress.org/support/users/webcart/)
 * (@webcart)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/child-theme-problem-32/#post-15025394)
 * Hi,
    Looks like a jave script I am adding to functions.php file is causing this
   issue. Can you understand why?
 *     ```
       //////////////////////Customs code starts below////////////////////////////
       //BOF header scroll change
       ?>
       <script>
       window.onscroll = function() {scrollFunction()};
   
       function scrollFunction() {
         if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
           document.getElementById("ast-desktop-header").style.background = "#000";
         } else {
           document.getElementById("ast-desktop-header").style.background = "transparent";
         }
       }
       </script>
       <?php
       //EOF header scroll change
       //
       ```
   
 *  [Herman Asrori (BSF)](https://wordpress.org/support/users/bsfherman/)
 * (@bsfherman)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/child-theme-problem-32/#post-15110728)
 * Hi [@webcart](https://wordpress.org/support/users/webcart/),
 * We are sorry for the delay.
 * If I read the description you described the issue, I would say it is clear that
   something on your child theme causes the issue. If you remove the code you shared
   with us in your last comment above then everything starts working, then obviously
   that code is the one that causes the issue.
 * Since we cannot help you with a query related to custom code as it is beyond 
   our support, I would suggest you contact the code provider to get help or let
   see if there’s someone in the community who can provide any insights.
 * Kind regards,
    Herman 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Child theme problem’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/astra/4.13.2/screenshot.jpg)
 * Astra
 * [Support Threads](https://wordpress.org/support/theme/astra/)
 * [Active Topics](https://wordpress.org/support/theme/astra/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/astra/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/astra/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Herman Asrori (BSF)](https://wordpress.org/support/users/bsfherman/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/child-theme-problem-32/#post-15110728)
 * Status: not resolved