• Resolved b7itzz

    (@b7itzz)


    I’m trying to figure out how to display a graphics on product pages for products that contains a specific string. Any help is greatly appreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello @b7itzz,

    If i understood correctly, you wanted to display custom graphics based on product rating in the product detail page. Could you please specify where you exactly wanted to display them in the detail page?

    Cheers!
    Naz.

    Thread Starter b7itzz

    (@b7itzz)

    Hi Naz, I want to display a graphic above the product name for products that contains the word “preowned” in their title. If the product title contains the word “pre-owned”, it should display an image above the product name.

    Mirko P.

    (@rainfallnixfig)

    Hi @b7itzz,

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook Community group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Cheers.

    Hello @b7itzz,

    As @rainfallnixfig stated, this is a fairly complex development topic. But Im going to try my best to help here.

    You could use “Advance custom field” to create an image field which can be assigned to specific category of products. And then you can group all those product within the specific category, let’s say “Pre-owned”. Once you do this you may have to use a page builder to output the field in the single product page. This guide explains it very well.

    Hope this helps!
    Naz.

    Hi @b7itzz

    On a side note, you could use the String Locator plugin to track down the string “preowned”: https://www.ads-software.com/plugins/string-locator/

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, the above info was helpful.

    If you have further questions, please feel free to open a new topic.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Display an image on product page if the product title contains a specific string’ is closed to new replies.