Używam wordpressa z wtyczką Advance Custom Fields i chcę dodać jedną regułę - ukrywać pole "rabat" - 11$s, jeśli nie zostało wypełnione.
<div <?php post_class("loop ".$item_style." ".$color_set." ". $portfolio_format)?> id="portfolio-<?php the_ID(); ?>"> <?php .... //output if( $item_style == "style-1" ){ printf(' <figure class="image-thumbnail"> </figure> <section class="text"> %5$s %6$s %7$s %8$s </section> ', $thumbnail_image_output, $permalink, $target, $title, $title_output, $term_list, $desc_output, $read_more ); }else{ printf(' <figure class="image-thumbnail"> %1$s <div class="rabat"> −%11$s% </div> <div class="description"> <table cellspacing="0" style="border-collapse: collapse; border: none;"> <tr> </tr> </table> </div> </figure> <div class="overlay"> <section class="text"> %5$s %6$s %7$s </section> </div> ', $thumbnail_image_output, $permalink, $target, $title, $title_output, $term_list, $desc_output, get_field('port'), get_field('zaloga'), get_field('cena'), get_field('rabat')); } ?> </div>
Z PHP jestem noga

Ktoś może mi pomóc?
Da radę coś z tym zrobić?