Home › Forums › WoodMart support forum › Child functions.php
Child functions.php
- This topic has 3 replies, 2 voices, and was last updated 3 years, 8 months ago by
Artem Temos.
-
AuthorPosts
-
August 24, 2021 at 12:19 am #314196
newK9ParticipantHi 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 );
August 24, 2021 at 2:41 am #314203
Artem TemosKeymasterHello,
Yes, this small fix needs to be applied to correct the CSS files order issue on the page.
Kind Regards
August 25, 2021 at 11:44 pm #314674
newK9ParticipantHi 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.August 27, 2021 at 10:11 am #314880
Artem TemosKeymasterHello,
Please, send us your admin access so we can see the error.
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register