PHP if elseif else – universal
-
Hi everyone π
Regarding PHP if elseif else…
1. I want it to work In all pages where the code will be used.
2. if there is no “taxonomy download_artist”, then display the default “Author code” instead.
3. My download_artist (taxonomy) and Author code is working fine the only issue im facing is with PHP if elseif else!
My example which does not work:
<?php if { ?> <?php $artist = get_the_term_list( $post->ID, 'download_artist', '', ', ', '' ); if (!is_wp_error( $artist ) && '' != $artist ) {echo '<div class="text-muted text-sm text-ellipsis">'. esc_html__('by ','musik') . $artist .'<i class="fa fa-check-circle text-wildstuff"></i></div>'; } ?> <?php } else { ?> <?php if( get_theme_mod( 'show-author' )){ $user_id = $post->post_author;echo get_user_link($user_id); } ?> <?php } ?>Please help thank you!
The topic ‘PHP if elseif else – universal’ is closed to new replies.