Site logo

[Resolved] Adding text via hook on woocommerce category page

Home Forums Support [Resolved] Adding text via hook on woocommerce category page

Home Forums Support Adding text via hook on woocommerce category page

  • This topic has 5 replies, 2 voices, and was last updated 4 years ago by Ying.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2177832
    Andrew

    I’m trying to add some custom text, preferably varying by category, but I’m struggling to find the required hook. I assume it’s a hook I need?

    I’ve added a link in the private information for an example – I’d like the text above the product links? Or below if above isn’t possible.

    Any pointers much appreciated!

    Thanks.

    #2177844
    Ying
    Staff
    Customer Support

    Hi Andrew,

    I think this is what you need ( visual hook guide for Woo pages):
    https://www.businessbloomer.com/woocommerce-visual-hook-guide-archiveshopcat-page/

    You can use woocommerce_shop_loop_item_title hook, if the hook is not in the drop down list, then choosecustom hook, enter this hook name.

    #2177866
    Andrew

    Thanks! That’s done the trick.

    One semi-related question when it comes to Elements: When should I use the Element type Block and when should I use Hook? Because it feels like as you can use hooks in Blocks there is no need to ever use the Hook element – Or is there?

    #2177878
    Ying
    Staff
    Customer Support

    When should I use the Element type Block and when should I use Hook?

    In hook element, you can use JavaScript/PHP/CSS/HTML.

    Block element is similar to hook element, but the content will be block based, not code based.

    Hope I made it clear 🙂

    #2177904
    Andrew

    Thanks – All clear 🙂

    #2177920
    Ying
    Staff
    Customer Support

    Great 🙂

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