Witam,
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">
<a href="%2$s" target="%3$s" title="%4$s">%1$s
</a> </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
−%11$s%
<div class="description"> <table cellspacing="0" style="border-collapse: collapse; border: none;"> <td><span class="icon-new-user-1 icon"> max %9$s
</span></td> <td><span class="icon-line-cart icon"> od %10$s PLN
</span></td> </figure>
<a href="%2$s" target="%3$s" title="%4$s"></a>
<section class="text">
%5$s
%6$s
%7$s
</section>
', $thumbnail_image_output, $permalink, $target, $title, $title_output, $term_list, $desc_output, get_field('port'), get_field('zaloga'), get_field('cena'), get_field('rabat'));
}
?>
Z PHP jestem noga

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