Home Forums WoodMart support forum Hide empty categories on page tittle

Hide empty categories on page tittle

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #142846

    prokurent
    Participant

    Hey. Can you write how to hide empty categories in page tiitle categories menu?
    Thanks

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

    prokurent
    Participant

    I would like to display all categories as a drop-down list, but let them hide those categories where there are no products.

    #142897

    Hello,

    Option “Categories in page title” will show the categories menu generated automatically based on all categories in the shop. It is not possible to manage this menu as other WordPress menus. By default, sub-categories will be displayed as the drop-down list

    Best Regards

    #142899

    prokurent
    Participant

    Someone else had the same problem and you sent the code. Unfortunately for me this code does not want to work – enter the code error when I add snippet

    https://xtemos.com/forums/topic/how-to-hide-empty-categories/

    “Don’t Panic
    The code snippet you are trying to save produced a fatal error on line 62:

    Cannot redeclare woodmart_product_categories_nav() (previously declared in /var/web/site/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php:616)
    The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.

    Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.”

    #142914

    Hello,

    Have you added the code to the functions.php of the child theme? Please provide your site admin access to the private area for checking.

    Best Regards

    #142921

    prokurent
    Participant

    Yes, I tried to add this code using the Snippets plugin and: “Don’t Panic
    The code snippet you are trying to save produced a fatal error on line 62:

    Cannot redeclare woodmart_product_categories_nav() (previously declared in /var/web/site/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php:616)”

    I tried to add in theme child editor and not working.

    #142960

    Eric Watson
    Participant

    Hello,

    Please, provide us your FTP access so we can log in and check this on your side.

    Thank you in advance.

    #142961

    prokurent
    Participant

    OK!

    #142979

    Hello,

    We have added the code, please check how it works now. If there are any problems, let us know.

    Best Regards

    #142983

    prokurent
    Participant

    OK thank you so much. I can see this code and I don’t understand why it didn’t work in Snippets Plugin …

    Can you still write me how can I change the main image of woocommerce_single to another one? Eg woocommerce_product_thumbnails_large_size?

    I have a lot of images that are tall but narrow – I made the thumbnails with a square plug Simple Resize Image but the template shows the main photos (woocommerce_single) that I can’t edit manually (5,000 photos)

    I tried this code
    add_filter(‘woocommerce_product_thumbnails_large_size’,
    function(){ return ‘woocommerce_single’; });

    but not working.

    #143010

    prokurent
    Participant

    UPDATE

    Works well

    add_filter(‘woocommerce_product_thumbnails_large_size’, function(){ return ‘woocommerce_single’; });
    add_filter(‘woocommerce_image_sizes_to_resize’,’__return_empty_array’);

    #143036

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

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