Count error

  • Anonymous

    #49610

    Yep using a child theme, getting it when viewing the front end, any page

    Admin

    Syahir Hakim

    #49611

    Seems to point to a minor issue with the way scripts are loaded by the child theme. Can you copy and paste the part of your child theme that registers and enqueues the scripts?

    Anonymous

    #49612

    All I’ve got in functions is:

    function theme_enqueue_styles() {
        $parent_style = 'parent-style';
    	wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
        wp_enqueue_style('child-style', get_stylesheet_directory_uri() . '/style.css', array($parent_style));
    }
    add_action('wp_enqueue_scripts', 'theme_enqueue_styles');
    Admin

    Syahir Hakim

    #49613

    Try changing that to this:

    function theme_enqueue_styles() {
    	$ver = wp_get_theme()->get('Version');
    	wp_enqueue_style( 'graphene', get_template_directory_uri() . '/style.css', array( 'bootstrap', 'font-awesome' ), $ver );
    	wp_enqueue_style( 'graphene-child', get_stylesheet_uri(), array( 'graphene' ), $ver );
    }
    add_action('wp_enqueue_scripts', 'theme_enqueue_styles');
    

    Anonymous

    #49614

    That fixed it, thanks!

Viewing 5 posts - 11 through 15 (of 15 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.