My question may be strange, but it really confused me!
In my child theme, I used to call and load the files next to the function.php file without any problem, but after deleting and re-inserting all the files in the child folder, it is not possible to identify the files. I used the following commands.
Inside the function.php file, I call its side file, the user_function.php file, but it is not recognized even with the command
if (file_exists('user_function.php')) {
     require_once('user_function.php');
} else {
     echo "Please try back in 30 minutes...\n";
     die;
}
The file is not recognized! and displays the error message!!!
Of course, my site is loaded, but when I go to wp-admin, it is clear that the user_function.php file is not loaded.
I have only these two files in my child theme folder:
- function.php
- user_function.php
Where is the problem from? (These instructions are not really complicated or difficult and I have used these instructions many times before in different places, but now they are challenging me)
I switched several times between other themes and even the parent template
+update:
I ran into a strange problem! Now, every other file that I want to load into function.php and user_function.php, I have to address it with __DIR__, I think the problem must be somewhere else!
I sent a hosting ticket, they say that a problem happened a few hours ago and the connection with the database was disconnected, and they did not explain what happened, but I think that this must have caused the problem and damaged my WordPress path or addresses. Is it possible that the problem is from Did this happen?
 
    