-
AuthorPosts
-
November 22, 2022 at 8:52 pm #1373569
Hi
I get several errors generated by the Enfold theme on my website diyjewellery.com
This is causing very slow loading of the home page.Here’s the error found on the server the log:
“PHP Fatal error: Uncaught Error: Call to undefined function is_product_category() in /nas/content/live/diyjewellery1/wp-content/themes/enfold-child/functions.php:9\nStack trace:\n#0 /nas/content/live/diyjewellery1/wp-includes/class-wp-hook.php(308): {closure}(Object(WP))\n#1 /nas/content/live/diyjewellery1/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)\n#2 /nas/content/live/diyjewellery1/wp-includes/plugin.php(565): WP_Hook->do_action(Array)\n#3 /nas/content/live/diyjewellery1/wp-includes/class-wp.php(797): do_action_ref_array(‘wp’, Array)\n#4 /nas/content/live/diyjewellery1/wp-includes/functions.php(1332): WP->main(”)\n#5 /nas/content/live/diyjewellery1/wp-blog-header.php(16): wp()\n#6 /nas/content/live/diyjewellery1/index.php(17): require(‘/nas/content/li…’)\n#7 {main}\n thrown in /nas/content/live/diyjewellery1/wp-content/themes/enfold-child/functions.php on line 9″Can someone help figure out what’s happening please.
Thank you
LyseNovember 23, 2022 at 4:50 am #1373596Hi Lyse,
Is woocommerce plugin enabled on your site? the function is_product_category is defined in woocommerce so that error should not show up if the plugin is enabled.
If woocommerce is already enabled, please post us your login credentials (in the “private data” field), so we can take a look at your backend.- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( to be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.Best regards,
NikkoNovember 27, 2022 at 3:32 pm #1374020Hi Nikko
WooCommerce is activated.
Added temporary credentials below.
Thanks
LyseNovember 27, 2022 at 9:21 pm #1374062Hi,
Thanks for that. The error seems to be caused by the first function added your child theme functions.php file, on line 9. This might help you out getting rid of it: https://wordpress.stackexchange.com/questions/306513/use-is-product-category-properly
Best regards,
RikardNovember 27, 2022 at 9:32 pm #1374066Hi Rikard,
That coded snippet was provided by one of the Enfold theme support to help with with putting back the pagination on several custom product category pages.
Looking at the link to the code you sent, I’m not proficient in PHP so I’m not exactly sure what I need to change in my code snippet that won’t break pagination and fix my error.
Can you help me figure it out?
Thanks
LyseNovember 28, 2022 at 12:11 am #1374074Hi,
Have you tested your site without the custom code?
Can you confirm that removing this code solves your very slow page loading?
Perhaps it is not needed anymore for your custom pagination if it was from a few years ago.
Can you explain why your custom product category pages need this code for pagination, I don’t recall any current pagination issues.Best regards,
MikeNovember 28, 2022 at 1:01 am #1374083Hi Mike
I have commented out the code for pagination on custom pages.
It appears that my custom product category pages contain pagination without the code.
The site also loads faster.
The code is a couple of years old.If you don’t mind I’ll do further testing tomorrow morning before closing this ticket.
Thank you
LyseNovember 28, 2022 at 1:33 am #1374087 -
AuthorPosts
- You must be logged in to reply to this topic.