Home Forums Add-ons Options Page Display html for selected products


Display html for selected products

  • hello, I want to display some html ONLY for selected woocommerce products (or another option is ONLY for selected product category) which are selected in option page with realtionship picker. My result is: html is displayed for all products instead. This is what I have:

    $post = get_field('pick_products', 'option');
    $prom_img = get_field('promo_img', 'option');
    if ( $post ) {
     foreach( $post as $post ):
       $sales_html = '<div class="promo-badge test"><img src=' . $prom_img['url'] . '></div>';
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.