Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #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 ((

    #1259693

    Hey 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,
    Victoria

    #1259774

    So, 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 ((

    #1259824

    Hi 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,
    Nikko

    #1260114

    Thanks. 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?

    #1260202

    Hi 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,
    Nikko

    #1260210

    Yes of course. thanks

    #1260266

    Hi 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,
    Nikko

    #1260292

    You 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.

    https://prnt.sc/vie39l

    • This reply was modified 4 years, 1 month ago by Konstantin.
    #1260616

    Hi,

    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,
    Nikko

    #1260914

    I 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/vkit9p

    #1261708

    Hi 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,
    Nikko

    #1261711

    Yes of course

    #1261713

    Please do it quickly ((Even yesterday’s recovery does not help …
    Why did it happen? I created an intermediate site.

    #1261719

    I 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-child

    Too 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 21

    This is just a small part to show you. There are a lot of duplicates !!!

    #1261734

    Hi 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,
    Nikko

    #1261757

    Thanks. 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.

    #1261762

    Hi Konstantin,

    Yes, I understand and I apologize, I didn’t expect an error 500 after activating the child theme.

    Best regards,
    Nikko

    #1264150

    I 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/vtca2s

    #1264402

    Hi 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,
    Rikard

    #1264425

    Yes, I understand you. Sorry to write in multiple places. It’s just that there was the same problem, only with the Parent theme

Viewing 21 posts - 1 through 21 (of 21 total)
  • You must be logged in to reply to this topic.