Home Forums Theme Support Dokan Child theme functions.php causes blank page

This topic is: resolved

This topic contains 3 replies, has 3 voices, and was last updated by  Sk 4 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22674

    Kevin
    Member
    Post count: 46

    Hello, I'm trying to create a child theme and following the documentation causes the page to become blank. Specifically when I enter the functions.php code:

    <? php
    
    define('THEMEROOT', get_stylesheet_directory_uri());
    function scripts() {
    	wp_enqueue_style( 'dokan-child-style', THEMEROOT . '/style.css', false, null );
    }
    
    add_action(wp_enqueue_scripts', 'scripts', 99);

    Any help?

    #22680

    Tareq Hasan
    Keymaster
    Post count: 2831

    Seems like you missed a quote on the add_action function
    add_action( 'wp_enqueue_scripts', 'scripts', 99);

    #22686

    Kevin
    Member
    Post count: 46

    Unfortunately, that didn't fix the issue.

    <? php
    
    define('THEMEROOT', get_stylesheet_directory_uri());
    function scripts() {
    	wp_enqueue_style( 'dokan-child-style', THEMEROOT . '/style.css', false, null );
    }
    
    add_action('wp_enqueue_scripts', 'scripts', 99);
    #22800

    Sk
    Moderator
    Post count: 371

    Please remove the space from the first line in <? php -> <?php. may be this is the problem.

    Thank you.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Child theme functions.php causes blank page’ is closed to new replies.