Tagged: enfold, Enfold child theme, update
-
AuthorPosts
-
November 10, 2020 at 7:10 am #1259486
Can’t set up Enfold Child
Hello, so I can not update the normal theme. After Updating the theme, all code changes disappear ((
What I’ve done:
1. Installed Enfold Child;2. Imported settings from the Parent theme; (screenshot: https://prnt.sc/vghvn1);
3. Transferred through Ftp, 4 files with modified code:
a) loop-index.php
b) loop-comments.php
c) postslider.php
d) single.php
(screenshot: https://prnt.sc/vghxh9)4. After that, switched to the Parent theme and Updated it. The modified code doesn’t work. Maybe I’m doing something wrong ((
November 10, 2020 at 11:16 pm #1259693Hey Konstantin,
Well, the files in the child theme have to be updated too and then changes need to be made in them again, on top of the fresh files.
If you need further assistance please let us know.
Best regards,
VictoriaNovember 11, 2020 at 7:12 am #1259774So, why do I need a Child theme then? I can make changes to the Parent theme after every update.
What is the point then from the Child theme? I do not understand ((
November 11, 2020 at 11:21 am #1259824Hi Konstantin,
Based on the screenshot you gave, there are two things that are wrong, first one is loop-index.php and loop-comments, should be inside the includes folder.
The second one is postslider should be in shortcodes folder.
As for child theme files that need to be updated and what’s the point of it then, I think you will rarely need to update the theme files and child theme does preserve the tweak in your theme files.
For example (had some cases in this forum with this issue), if you have modified header.php then a major update is being made in Enfold, and in this case, header.php is being updated since some features for the header has been added, then most likely you will need to have your header.php modified again to include these new code inserted on it, otherwise, even though you will still have your header intact but unless you update it then you won’t be able to use the additional features.Best regards,
NikkoNovember 12, 2020 at 1:11 pm #1260114Thanks. But unfortunately I still can’t ((. I did everything as you said. I placed all the files of the Child theme in the necessary folders and subfolders …
In principle, it practically worked out. Only this code in Function.php does not work:
/ * Pagination for Blog pages. So that when you go to page 2, the page does not go to the very top * /
function add_custom_script () {
?>
<script>
jQuery (window) .load (function () {
jQuery (“nav.pagination a”). each (function () {
var theLink = jQuery (this) .attr (“href”);
jQuery (this) .attr (“href”, theLink + “# home-blog”);
});
});
</script>
<? php
}
add_action (‘wp_footer’, ‘add_custom_script’);
/ * End of Pagination for Blog pages * /And after the Update, some Plugins break …
Also, please tell me: Which topic should be constantly Active: Enfold or Enfold Child?
November 12, 2020 at 7:27 pm #1260202Hi Konstantin,
It should be Enfold Child.
Also for the issue you mentioned, can you give us temporary admin access? so we can inspect further.
Just post the credentials in private content.Best regards,
NikkoNovember 12, 2020 at 8:23 pm #1260210Yes of course. thanks
November 13, 2020 at 5:59 am #1260266Hi Konstantin,
Thanks for giving us admin access.
You will need to switch to the child theme before the code will work.
As of now, I could see your site using the parent theme instead of the child.Best regards,
NikkoNovember 13, 2020 at 7:23 am #1260292You are absolutely right. The code will work!
The code will stop working when I update the Parent theme.If within 30 minutes I cannot fix the problem, then I restore the previous version of Enfold.
Since together with the Code, this page still stops working for me:
https://www.ulovanet.ru/tik-tok-rybalka-video-smotrite-onlajn-skachat/You also need to look for a problem.
- This reply was modified 4 years ago by Konstantin.
November 16, 2020 at 3:15 am #1260616Hi,
Instead of switching it on your live site, can you try to setup a staging site? so it will be an exact copy of your site and environment but separate from it, so we can investigate it further.
Here’s a simple tutorial you can follow: https://themeisle.com/blog/wordpress-staging-site/Best regards,
NikkoNovember 17, 2020 at 8:03 am #1260914I created an intermediate site:
1. Function.php is broken. Does not work;
2. Page: https://www.ulovanet.ru/tik-tok-rybalka-video-smotrite-onlajn-skachat/ – Broken. Does not work;
3. // set builder mode to debug
add_action (‘avia_builder_mode’, “builder_set_debug”);
function builder_set_debug ()
{
return “debug”;
}
Broken. Does not work;4. / * Pagination for Blog pages. So that when you go to page 2, the page does not go to the very top * /
function add_custom_script () {
?>
<script>
jQuery (window) .load (function () {
jQuery (“nav.pagination a”). each (function () {
var theLink = jQuery (this) .attr (“href”);
jQuery (this) .attr (“href”, theLink + “# home-blog”);
});
});
</script>
<? php
}
add_action (‘wp_footer’, ‘add_custom_script’);
/ * End of Pagination for Blog pages * /
Broken. Does not work;Maybe something else breaks on the site after Updating the theme. It takes more time to notice this ((
Screenshots:
1. https://prnt.sc/vkisid
2. https://prnt.sc/vkisro
3. https://prnt.sc/vkit9pNovember 20, 2020 at 5:14 am #1261708Hi Konstantin,
I have switched from parent to child theme and site shows HTTP Error 500.
I apologize for this, can you give us FTP access, so we can restore it back.Best regards,
NikkoNovember 20, 2020 at 5:48 am #1261711Yes of course
November 20, 2020 at 6:09 am #1261713Please do it quickly ((Even yesterday’s recovery does not help …
Why did it happen? I created an intermediate site.November 20, 2020 at 7:57 am #1261719I restored everything back. Switched the working version of the theme from Enfold Child to Enfold.
To prevent this from happening, I created an intermediate site, as you advised.
Enfold Child doesn’t work for me. Nobody knows why ((The problem I think is in this file:
../home/admin/web/ulovanet.ru/public_html/wp-content/themes/enfold-childToo many duplicates of PHP Fatal error in PHP_errors.log file
[20-Nov-2020 05:19:15 UTC] PHP Fatal error: Cannot redeclare builder_set_debug() (previously declared in /home/admin/web/ulovanet.ru/public_html/wp-content/themes/enfold-child/functions.php:20) in /home/admin/web/ulovanet.ru/public_html/wp-content/themes/enfold/functions.php on line 21
[20-Nov-2020 05:19:19 UTC] PHP Fatal error: Cannot redeclare builder_set_debug() (previously declared in /home/admin/web/ulovanet.ru/public_html/wp-content/themes/enfold-child/functions.php:20) in /home/admin/web/ulovanet.ru/public_html/wp-content/themes/enfold/functions.php on line 21This is just a small part to show you. There are a lot of duplicates !!!
November 20, 2020 at 9:50 am #1261734Hi Konstantin,
Thanks, I could not access FTP with the credentials, but it’s not necessary since you have already managed to fix it.
As for why it happened, the most likely reason is the one you posted.
These are the things I noticed after checking again.
1. includes > style.css can be deleted
2. functions.php is empty, you need to re-add these codes:/*Пагинация для страниц Блога. Чтобы при переходе на 2 страницу, страница не переходила в самый вверх*/ function add_custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery("nav.pagination a").each(function(){ var theLink = jQuery(this).attr("href"); jQuery(this).attr("href", theLink + "#home-blog"); }); }); </script> <?php } add_action('wp_footer', 'add_custom_script'); /*Конец Пагинации для страниц Блога*/ /*В хлебных крошках Меняет "Домашняя страница" на "Главная"*/ add_filter('avia_breadcrumbs_args', 'avia_change_home_breadcrumb', 10, 1); function avia_change_home_breadcrumb($args){ $args['show_home'] = 'Главная'; return $args; } /*Конец - В хлебных крошках Меняет "Домашняя страница" на "Главная"*/ /*Удаляем Надпись "Архив для Категории:" в рубриках и Метках*/ add_filter('avf_which_archive_output','avia_new_archive_output'); function avia_new_archive_output(){ if (is_archive()) { $output = __('','avia_framework')." ".single_tag_title('',false); } return $output; }
3. includes > functions.php can be deleted (this also contains code from functions.php of the parent theme which will cause the duplicate error you posted)
Best regards,
NikkoNovember 20, 2020 at 11:55 am #1261757Thanks. I will definitely try to do this, but a little later.
First you need to calm down after today’s stress, due to problems with the site. The site was broken for over an hour with an Error 500. This is a disaster for me.
November 20, 2020 at 12:16 pm #1261762Hi Konstantin,
Yes, I understand and I apologize, I didn’t expect an error 500 after activating the child theme.
Best regards,
NikkoDecember 1, 2020 at 8:44 am #1264150I tried everything as you suggested. There are errors anyway.
Did everything on the staging site using the Wp Staging plugin:1.https: //www.ulovanet.ru/staging/?page_id=40210 – Error;
2.https: //www.ulovanet.ru/staging/?p=12875 – Error. Google Maps doesn’t work;
3. Error in theme editor – Function.php.I tried to display it in more detail in the Screenshots … I also show a small part of the code Php_errors
https://prnt.sc/vtc6rz
https://prnt.sc/vtc8c9
https://prnt.sc/vtc9uk
https://prnt.sc/vtca2sDecember 2, 2020 at 5:40 am #1264402Hi Konstantin,
First of all, please try the suggestions I posted in your other thread. After that we can look at your other problems.
Best regards,
RikardDecember 2, 2020 at 8:13 am #1264425Yes, I understand you. Sorry to write in multiple places. It’s just that there was the same problem, only with the Parent theme
-
AuthorPosts
- You must be logged in to reply to this topic.