• Resolved Scribelle

    (@scribelle)


    Hello,

    I like your theme, so I’m creating a website with Hestia free theme. Of course I work on a child theme (with all the files needed).

    I had almost finished my changes, when I decided to update your last version of parent theme of Hestia…
    And wot? My child theme broke. I need to make it again totally.

    By the way, in your Hestia Theme (parent), there are still 14 errors (in red) in your code. It means that if one wants to modify something even in the parent’s theme, one would take a risk by updating its changes.

    The errors are showed here:

    .woocommerce .products.columns-6 {
    grid-template-columns: repeat(6, 1fr);
    }
    .woocommerce .products.columns-5 {
    grid-template-columns: repeat(5, 1fr);
    }
    .woocommerce .products.columns-4 {
    grid-template-columns: repeat(4, 1fr);
    }
    .woocommerce .products.columns-3 {
    grid-template-columns: repeat(3, 1fr);
    }
    .woocommerce .products.columns-2 {
    grid-template-columns: repeat(2, 1fr);
    }
    .woocommerce .products.columns-1 {
    grid-template-columns: 1fr;
    }

    grid-template-columns: repeat(4, 1fr);
    }

    grid-template-columns: repeat(2, 1fr);
    }

    .woocommerce .products.columns-1 {
    grid-template-columns: 1fr;
    }

    .woocommerce .content-sidebar-right .products.columns-5 {
    grid-template-columns: repeat(2, 1fr);
    }

    grid-template-columns: 1fr;
    }

    .woocommerce .content-sidebar-right .products.columns-5 {
    grid-template-columns: 1fr;
    }

    13 times, it seems that the error ends when I remove all the numbers “1”.

    The fourteenth error is just about a } to remove.

    Can i do it myself? (on the parent page I mean).

    Well, I decided to create from zero a new child theme, but this time, I’d like to be sure that everything will work in the future with a new update of your theme …

    How do you explain this ?

    In advance, thank you for your reply. It will take you less time that I spent to face that bad surprise of fail. (Hours to do it again despite css modifications in a child theme) …

    Best Regards.
    Hoping that somebody will answer maybe a sunday.
    Thank you.

    PS : I can not show you an URL because this site is still under construction.

    • This topic was modified 5 years, 3 months ago by Scribelle.
    • This topic was modified 5 years, 3 months ago by Scribelle.
Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m having problems too. Mostly it seems like the style.css for the parent theme isn’t being enqueued properly. When I add the enqueue code like so:

    function hestia_style() {
    	wp_enqueue_style( 'hestia-style', get_template_directory_uri() . '/style.css' );
    }
    add_action( 'wp_enqueue_scripts', 'hestia_style' );

    It seems to fix the site for the most part, however, still a lot of things are weird looking or downright broken (top bar, for example, has sort of… gone missing?). Maybe other styles or theme files are not being enqueued properly either?

    What the heck happened? I’ve used this theme on about 5 sites now and they all end up like this when I update, so I have to roll it back to the previous version.

    • This reply was modified 5 years, 2 months ago by the9mm.

    Upon further inspection, I have determined that there’s an additional stylesheet that now needs to be enqueued in the child theme configuration. Here’s what I have:

    Here’s the code I had in the child theme, autoconfigured by Child Theme Configurator:

    <?php
    // Exit if accessed directly
    if ( !defined( 'ABSPATH' ) ) exit;
    
    // BEGIN ENQUEUE PARENT ACTION
    // AUTO GENERATED - Do not modify or remove comment markers above or below:
    
    if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
        function chld_thm_cfg_parent_css() {
            wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( 'bootstrap','hestia-font-sizes','font-awesome' ) );
        }
    endif;
    add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css', 10 );

    If I replace this with the Hestia new child theme markup, almost everything is fixed (with exception to the missing Very Top Bar):

    <?php
    if ( !defined( 'ABSPATH' ) ) exit;
    
    if ( !function_exists( 'hestia_child_parent_css' ) ):
        function hestia_child_parent_css() {
            wp_enqueue_style( 'hestia_child_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( 'bootstrap' ) );
      if( is_rtl() ) {
        wp_enqueue_style( 'hestia_child_parent_rtl', trailingslashit( get_template_directory_uri() ) . 'style-rtl.css', array( 'bootstrap' ) );
      }
    
        }
    endif;
    add_action( 'wp_enqueue_scripts', 'hestia_child_parent_css', 10 );
    
    /**
     * Import options from the parent theme
     *
     * @since 1.0.0
     */
    function hestia_child_get_parent_options() {
      $hestia_mods = get_option( 'theme_mods_hestia' );
      if ( ! empty( $hestia_mods ) ) {
        foreach ( $hestia_mods as $hestia_mod_k => $hestia_mod_v ) {
          set_theme_mod( $hestia_mod_k, $hestia_mod_v );
        }
      }
    }
    add_action( 'after_switch_theme', 'hestia_child_get_parent_options' );
    
    function accordion() {
      wp_enqueue_script('accordion', get_stylesheet_directory_uri() . '/jquery.accordion.js', array('jquery'));
      wp_enqueue_script('accordion', get_stylesheet_directory_uri() . '/accordion.js', array('jquery'));
    
    }
    add_action ('wp_enqueue_scripts', 'accordion');

    I have also found that deleting my header.php in my child theme restores the Very Top Bar, so there is likely a conflict between the parent and child theme in this version.

    • This reply was modified 5 years, 2 months ago by the9mm.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘last version update’ is closed to new replies.