Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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
    Lyse

    #1373596

    Hi 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.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. 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 ).
    5. Click ” Submit “.
    6. 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,
    Nikko

    #1374020

    Hi Nikko
    WooCommerce is activated.
    Added temporary credentials below.
    Thanks
    Lyse

    #1374062

    Hi,

    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,
    Rikard

    #1374066

    Hi 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
    Lyse

    #1374074

    Hi,
    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,
    Mike

    #1374083

    Hi 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
    Lyse

    #1374087

    Hi,
    Glad to hear.

    Best regards,
    Mike

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.