If empty in "custom page" $featch_data
-
hello,
First of all awesome plugin!
I’m stuck at something and can’t find out how to fix it.Building an custom page function with 2 simple fields.
These simpel fields are going to be “a href=””>” but they have to be hidden when the fields are not filled.hope my brokan function wil explain my problem:
<?php if ( $photos_query->have_posts() ) : $photos_featch_data = '<div class="partner-box">'; while ( $photos_query->have_posts() ) : $photos_query->the_post(); $photos_featch_data .= '<div class="item"> <div class="partnerfoto-holder"> '.get_the_post_thumbnail($page->ID, "partnerfoto").' </div> '.$facebook = get_post_meta(get_the_id(), "_simple_fields_fieldGroupID_1_fieldID_1_numInSet_0", true); if ( $facebook ) { echo '<a href="'$facebook'">facebook</a>'; }.' <div class="partnertext-holder"> <h3>'.get_the_title().'</h3> <p>'.get_the_content().'</p> </div> </div>'; endwhile; $photos_featch_data .= '</div>'; wp_reset_postdata(); ?> <?php else: ?> <?php endif; //return shortcode data return "{$photos_featch_data}";The $facebook function doesn’t work. tryed many ways but I think i’m to noob in php :S
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘If empty in "custom page" $featch_data’ is closed to new replies.