How to Create Custom Product Badges in Woocommerce for Free?

Поділитися
Вставка
  • Опубліковано 1 лис 2024

КОМЕНТАРІ • 102

  • @wpsimplehacks
    @wpsimplehacks  2 роки тому +2

    Did everything work out for you as shown in the video? Let me know in the comments.

    • @ArtsyArias
      @ArtsyArias 2 роки тому +1

      Great Video, Thank you !!. However, there seems a slight Glitch in this. I encountered this while I tried impementing this on my site.
      1). I found that, when we use an Input field option - "display Woocommerce product badge with custom text" (the last option in your Blog post), it works correctly. Everything seems working fine initially. But the moment we Add out custom Text and Save it at Backend (Product options), then I found that I CANNOT remove that custom text (if at all I want to, for some reason). That gets Saved permanently.
      That is, when I tried to remove (empty that custom text field), and Save the product page, it still shows that Custom text afterwards (in the backend as well as frontend). Not sure, why ??
      What actually works is, if we change or replace our Custom text, then it works perfectly again. Means, it is changing or updating the Custom text, but not completely removing (emptying) it. When we already saved it, once.
      Can you please try to replicate at your end. Means by first adding custom text and saving it and seeing at frontend. Then, at backend, try to remove that custom text (making field empty), and Re-saving it. If that is working or not
      Please suggest me how to resolve this issue.
      Regards

    • @BlackJacketJones
      @BlackJacketJones 2 роки тому

      nope. didnt work.

    • @miguelappsaplicacionesyjue9224
      @miguelappsaplicacionesyjue9224 Рік тому

      Thanks for this video
      How can I put labels under the title and above the price in the product catalog?
      Thank you

    • @wpsimplehacks
      @wpsimplehacks  Рік тому +1

      @@miguelappsaplicacionesyjue9224 Use a correct hook location. Default ones are these www.businessbloomer.com/woocommerce-visual-hook-guide-archiveshopcat-page/
      If your theme or page builder (like Elementor) overrides default Woocommerce hooks then use the ones your theme or page builder provides.

    • @miguelappsaplicacionesyjue9224
      @miguelappsaplicacionesyjue9224 Рік тому

      @@wpsimplehacks Thank you for your quick response and for such a detailed explanation. I am using a theme
      I don't understand what I should do exactly, but don't worry.
      I do not understand that. I'll keep looking on Google.
      With your quick response, even if I can't do what I need, you have managed to get me to subscribe to your channel.
      Thank you

  • @schmidt7672
    @schmidt7672 2 роки тому +2

    You have not just helped me with this project but also with many other projects. Please keep up the good work. Your videos are detailed and easy to understand. Thank you. Much appreciated!

  • @lancelillie628
    @lancelillie628 2 роки тому +1

    I 'm finding your videos SUPER USEFUL! I'm adding hacks you've shown to all my customers sites! EXCELLENT!

  • @zensukai
    @zensukai 2 роки тому

    Wow, I just found your page ... fantastic work, thank you for these great tutorials!

  • @paulhere404
    @paulhere404 2 роки тому

    Thanks for the video, will be checking out your other videos. With the free shipping will it show on the shop page also, as think it would be as useful there.
    Also what plugin are you using to show hooks?
    Thanks

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому +1

      The theme I am using (Blocksy Pro) has a built in feature that allows me to see the hooks. 10% discount coupon is in the video description.
      You can also Google “Woocommerce visual hooks”
      Shipping info ahould also work on category/shop pages - just use the correct hook to display it in the right position.

    • @paulhere404
      @paulhere404 2 роки тому

      @@wpsimplehacks ok thanks, realized it was part of the theme after I sent the message, I'll take a look in the morning now. Just need to find the hooks for it then...

  • @gabrielcavaller4724
    @gabrielcavaller4724 2 роки тому

    Excellent work. Thanks so much. How would I best go about adding the version of the checkbox, instead of the existing "free shipping" location, putting it where the up to 20% bit is and also adding it on the archives? Thanks in advanced.

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Please explain a bit: as I understand you want the checkbox version but what should it contain and where do you need it?

  • @faforyou9235
    @faforyou9235 Рік тому

    Hi very thankful for your tutorial video! But I had some problem here..
    I currently using Astra Theme and ori sales badge is circle shape, can I know how to change the shape to rectangle same as you?

    • @wpsimplehacks
      @wpsimplehacks  Рік тому

      Astra Pro version has some Sale badge modification options, but it would be wise to ask about it from the Astra support team.

  • @gemorzo_bh
    @gemorzo_bh 2 роки тому

    Working like a charm, would love to see a video where we can sort out the products by discount percentage.

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      When a discount/sale price is applied to WooCommerce products, it is saved as the sale price in the database and not stored as a percentage value. For this reason, it is not possible to sort by percentage values, as these are not stored values in the database

    • @gemorzo_bh
      @gemorzo_bh 2 роки тому

      @@wpsimplehacks i have seen this product sorting option on a website, and really wanted to have it on mine. I wonder how they achieve that.

  • @webdevelopment801
    @webdevelopment801 2 роки тому

    You deserve a lot subscriber. Try bring more videos on regular basis. Hopefully people will recognise your effort sooner or later. Good luck

  • @alexandreboechat8994
    @alexandreboechat8994 Рік тому

    Great work buddy, keep going! nice.

  • @jennyonyinye1955
    @jennyonyinye1955 2 роки тому

    Very great content. I used all of it and i love it

  • @mallorydurrick
    @mallorydurrick 2 роки тому

    Works great. Thank you!

  • @GregorMima
    @GregorMima 2 роки тому

    Hi, cheers for your help! What im not getting tho is _where_ do you actually activate your badge to show at all? (btw im also using Blocksy) ... Any hints? Thank you!

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      I add the snippet to the Code Snippets (it is a plugin) code box. You have to use the correct hook for it, otherwise the badge will not show up. Also, Blocksy has two layouts for archive pages. In my video I use Type 1, because Type 2 uses Blocksy own hooks.

    • @GregorMima
      @GregorMima 2 роки тому

      @@wpsimplehacks Cheers got it, was missing the checkbox "backend" and found it on the products page! Great Help Thank You!

  • @alper4921
    @alper4921 2 роки тому

    Thanks for the detailed video and codes on your website. Would you be able to share a code for displaying a badge (png) based on attributes? For example, showing products brand (or made in EU badge etc.)? Cheers

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому +3

      Sorry, this is out of my scope right now. Maybe in the future I will have a bit more free time to modify the snippet. Can’t promise, though. I hope you understand.

  • @marcof6273
    @marcof6273 2 роки тому

    Hi! Great code! I have used your code on my site and it works when I do the product edit, however when I do "quick edit" of the product the badge disappears it doesn't keep it in memory. Has this ever happened to you? Can you give me some indication?

  • @faisal.enayat
    @faisal.enayat 2 роки тому

    Can we use this code with other archive widgets or does it only work with elementor's archive widget? thank you

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Sorry, but I don’t use Elementor :)
      Also, since Elementor overrides Woocommerce default hooks then most likely it’s not working with the Elementor. You can test it out and let me know though.

  • @anastasiades.konstantinos
    @anastasiades.konstantinos 2 роки тому

    I need to apply a custom badge to a specific product id. Is there a way to filter through every product id loop item and apply the badge on the loop item with the specific id?

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      You would have to use conditionals. See here www.businessbloomer.com/woocommerce-conditional-logic-ultimate-php-guide/#php-do-something-if-product-id-xyz

  • @TiagoDezan
    @TiagoDezan 2 роки тому

    Great video!! Thanks for this one!!

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Glad you liked it

    • @akindia8519
      @akindia8519 2 роки тому

      @@wpsimplehacks hi. Is there a way for footer add to cart button for woocommerce, especially for variable products

  • @viralclout4570
    @viralclout4570 Рік тому

    Thanks for this great video. I changed the Sale badge to % and it worked great. However, when I use the WooCommerce Best Seller Block or the New Products Block it doesn't work.

    • @wpsimplehacks
      @wpsimplehacks  Рік тому +1

      It’s because Woocommerce blocks are overriding default Woo hooks

    • @viralclout4570
      @viralclout4570 Рік тому

      @@wpsimplehacks Is there a workaround?

    • @wpsimplehacks
      @wpsimplehacks  Рік тому +1

      Use Woocommerce shortcodes (see their docs) to output best selling products. These should display products in a built in way.

    • @viralclout4570
      @viralclout4570 Рік тому

      @@wpsimplehacks It worked with the shortcuts. Thanks!

  • @zemtoyscomapny5512
    @zemtoyscomapny5512 2 роки тому

    Hello. dear sir Thanks for your great efforts. i have pasted the code in codesnippets, but it didnt worked for me. can you please help, why?

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      I don’t know because there may be a lot of reasons. For example, maybe your theme doesn’t support Woocommerce hooks. Or maybe it overrides it? Also, Elementor overrides Woo hooks.

  • @zaifhossain8509
    @zaifhossain8509 Рік тому

    You are a snippet master 😍😍👌👌

  • @johnmiller1281
    @johnmiller1281 8 місяців тому

    I am using the blocksy theme and I am unable to control the location of the new product badge. I can only display it in the center top. I had to remove the top and right from the css or it would not display at all. Any ideas? Thanks!

    • @wpsimplehacks
      @wpsimplehacks  8 місяців тому

      It would be wise to ask about it from the Blocksy support. They are pretty responsive

  • @carlosbotellanavarro5073
    @carlosbotellanavarro5073 2 роки тому

    Hi, is there any way to do the same thing with custom stock status? I would like to display a badge if the product has a certain stock status (seen this on the video you published about stock statuses thnx)

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      I haven't tried with custom statuses and therefore unfortunately I can't help you with that.

    • @carlosbotellanavarro5073
      @carlosbotellanavarro5073 2 роки тому

      @@wpsimplehacks and where could I find how to do it? Any idea? Sorry for the insistence 😅

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      "If anything else fails, read the manual" Murphy's law
      Where's the manual? Here woocommerce.com/document/variable-product/
      🙂

  • @morecolors1266
    @morecolors1266 2 роки тому

    Hello :) How can I add custom badge to product archive page like discount badge?

  • @kashfulbangladesh
    @kashfulbangladesh 2 роки тому

    thank you so much sir!!

  • @BenAnderson1
    @BenAnderson1 Рік тому

    When I add text to the Custom Badge form and save but I don't want the text there later if I delete the text it doesn't update. So for example: I enter "New Design" for a product badge. Then I want to change that to have no badge in a couple of weeks I can't just delete "New Design" and the badge disappears. Once the field has been used it retains that input until it's replaced with something else. I want the badge to disappear when I delete the text in that field.

    • @wpsimplehacks
      @wpsimplehacks  Рік тому

      Hi,
      Take a look at this modified code here and this should do the trick wpsimplehacks.com/custom-product-badges-for-woocommerce/#how-to-display-woocommerce-product-badge-with-custom-text

  • @RiccardoTurcato
    @RiccardoTurcato 2 роки тому

    There's something wrong with Blocksy update, the new badge have not the position correct. Could you check your code with new updates? TY

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      I just tested with the latest Blocksy and it’s workind well.
      Single product page cln.sh/EhHFtT
      Archive page cln.sh/n7mEVi

    • @RiccardoTurcato
      @RiccardoTurcato 2 роки тому

      @@wpsimplehacks Pro versione of blocky Is different? Ive try in two different sites and doesnt works well

    • @RiccardoTurcato
      @RiccardoTurcato 2 роки тому

      Could be the card type of archive products?

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Which cart type you’re using? Because Type two has some additional and different hooks. Try with Type one card - it uses default Woocommerce hooks.

  • @saveriometra2538
    @saveriometra2538 2 роки тому

    Hi I have an ecommerce site and I built the template with elementor and I tried to do the procedure you showed but it doesn't work, how can I do?

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Elwmentor overrides default Woocommerce hooks. So, you need to find out what hooks Elementor uses and use these.

    • @saveriometra2538
      @saveriometra2538 2 роки тому

      @@wpsimplehacks Thanks a lot

    • @saveriometra2538
      @saveriometra2538 2 роки тому

      @@wpsimplehacks Whats the hame of plugin taht you use in the video? For show the hooks

  • @BmxAddict08
    @BmxAddict08 7 місяців тому

    is there a snippet to show badge if product is in stock and hide when out of stock?

    • @wpsimplehacks
      @wpsimplehacks  7 місяців тому

      Not that I know of. Although, out of curiosity, why would need on because all products are in stoxk by default? If they are out of stock, then "Out of stock" badge is displayed.

    • @BmxAddict08
      @BmxAddict08 7 місяців тому

      @@wpsimplehacks Thank you for reply! For example i am selling bicycles, and would be nice to have a badge "fast shipping " to show which bikes can be delivered fast from our store, and which bikes are out of stock ( are not in our store), to make backorders but needs to wait 2-3 weeks from manufacturer.

    • @BmxAddict08
      @BmxAddict08 7 місяців тому

      @@wpsimplehacks i know i can make from your tutorial with custom field and make as a check option on every product that is in stock manually. But automatically would be less headache :)

    • @wpsimplehacks
      @wpsimplehacks  7 місяців тому +1

      Maybe this helps you out a bit: ua-cam.com/video/DzIX7RSY0v4/v-deo.html
      You have to find the right Woocommerce hook and mess a bit with CSS to display it as a badge on product image.

  • @GregorMima
    @GregorMima 2 роки тому

    Never mind found it thanks!

  • @sheikhnasim3048
    @sheikhnasim3048 Рік тому

    Possible For You To Updatee Css For Kadence...

  • @slingsandarrows
    @slingsandarrows Рік тому

    Is there code to add the custom badge to the archive image?

    • @wpsimplehacks
      @wpsimplehacks  Рік тому

      Try to add a hook from the archive page. For example, add_action( 'woocommerce_before_shop_loop_item_title', 'new_badge', 3 );

  • @gergoremete3011
    @gergoremete3011 Рік тому

    If I want to use with JetWooBuilder isn't works. :(
    And I didn't found jetwoo hooks

    • @wpsimplehacks
      @wpsimplehacks  Рік тому

      It would be wise to ask about it from JetWooBuilder team.

  • @Luigi-wp6rf
    @Luigi-wp6rf 2 роки тому

    valuable tips, thanks for what you do. Have you ever made a content about delivery time estimates ? I have found a code but I am having difficulty making it suitable for my needs. I can't apply the rule [> = day]. I would need it to report: * // monday> get it for wednesday * // tuesday> get it for thursday * // Wednesday> get it for Friday * // Thursday / Friday / Saturday / Sunday> get it on Tuesday the message text would be: order now to receive it {day label} the snippet I prepared works. but skip Thursdays 😅😅😅. Save Me 🙏🙏🙏

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      See whether this video helps you out ua-cam.com/video/Ni8VezPG-cg/v-deo.html
      Take a look at the 5:24 mark.

  • @slingsandarrows
    @slingsandarrows Рік тому

    How would I make this work if I wanted to use images as badges?

    • @wpsimplehacks
      @wpsimplehacks  Рік тому

      You would need to modify CSS for it.

    • @slingsandarrows
      @slingsandarrows Рік тому

      @@wpsimplehacks Do you mean use a background-image? Also, do you have a video on creating a product filter for the shop page? I've been trying to figure out a way to seperate my product categories under different headings in a filter sidebar.

  • @datboyfemi
    @datboyfemi 2 роки тому

    Great work, error code on line 8 for code snippet to create woocommerce custome text badge.

    • @datboyfemi
      @datboyfemi 2 роки тому

      showing "Cannot redeclare function woo_add_custom_fields."

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому +1

      I just tested it on my site and it works wi5hout any issues. Just pasted the inside Code Snippets box, activated it and no problems whatsoever.

    • @datboyfemi
      @datboyfemi 2 роки тому

      I would try it again

  • @Wake_saa
    @Wake_saa 2 роки тому

    👍👍👍👍

  • @jeffreyhuen
    @jeffreyhuen 2 роки тому

    🌟🌟

  • @patrickkwamebonsi4650
    @patrickkwamebonsi4650 2 роки тому

    am using flatsome theme. this is your css code .ct-woo-card-extra.new-badge{ Please what should my css code of my theme (am trying to create new label for my products)

    • @wpsimplehacks
      @wpsimplehacks  2 роки тому

      Sorry, unfortunately I'm not familiar with the Flatsome theme.