php - check isset value in wordpress widget -
how can check isset or empty value display or hide tag code not work
<?php if ($this->get_field_name( 'name1')){ ?> <li><a href="<?php echo $link1; ?>" target="_blank"><?php echo $name1; ?></a></li> <?php } this label widget
<p> <label for="<?php echo $this->get_field_id( 'name1' ); ?>"><?php _e( 'عنوان تبلیغ متنی اول' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'name1' ); ?>" name="<?php echo $this->get_field_name( 'name1' ); ?>" type="text" value="<?php echo esc_attr( $name1 ); ?>" /> </p>
ok found out
<?php if (esc_attr( $name1 )){ ?> <li><a href="<?php echo $link1; ?>" target="_blank"><?php echo $name1; ?></a></li>
Comments
Post a Comment