Home Forums WoodMart support forum Child functions.php

Child functions.php

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

    newK9
    Participant

    Hi Xtemos,

    I was just tweaking my child functions.php file and noticed a small difference between the two and was wondering whether I need to update? As I was wondering if this would cause issues or conflicts?

    The difference can be found where it states at the end woodmart_child_enqueue_styles’ 1000 the new child functions say’s 10010.

    Old child theme functions.php

    <?php
    /**
     * Enqueue script and styles for child theme
     */
    function woodmart_child_enqueue_styles() {
        wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'woodmart-style' ), woodmart_get_theme_info( 'Version' ) );
    }
    add_action( 'wp_enqueue_scripts', 'woodmart_child_enqueue_styles', 1000 );

    New child theme functions.php

    <?php
    /**
     * Enqueue script and styles for child theme
     */
    function woodmart_child_enqueue_styles() {
        wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'woodmart-style' ), woodmart_get_theme_info( 'Version' ) );
    }
    add_action( 'wp_enqueue_scripts', 'woodmart_child_enqueue_styles', 10010 );
    #314203

    Artem Temos
    Keymaster

    Hello,

    Yes, this small fix needs to be applied to correct the CSS files order issue on the page.

    Kind Regards

    #314674

    newK9
    Participant

    Hi Artem,

    Thank you for getting back to me. I’ve updated my child theme functions.php although I have noticed some issues appearing in the site. The issue is a HTTP API Calls returning a 404 not found error.

    I done a number of debugging methods to try and find the source and found that the issue is the child theme.

    This can be found when you go to woocommerce > Status, using Query Monitor. When I have switched to the parent theme this issue is not appearing. I have deactivated and only used the plugins available to woodmart theme and the issue still appears in the child theme.

    Do you have any ideas why this is happening?

    Attachments:
    You must be logged in to view attached files.
    #314880

    Artem Temos
    Keymaster

    Hello,

    Please, send us your admin access so we can see the error.

    Kind Regards

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