pustakakoran

Tombol link, kalau tidak terisi tidak muncul

Sep 25th, 2017
39
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UNTUK 1 VARIABEL:
  2. <?php
  3. $my_judul = get_the_title();
  4. if( ! empty( $my_judul ) ) {
  5. echo '<img id="rcorners1" src="/img/cover/' . $my_judul . '.jpg">';
  6. }
  7. ?>
  8.  
  9. UNTUK 2 VARIABEL:
  10. <?php
  11. $my_linkcover = get_post_meta( get_the_ID(), 'linkcover', true);
  12. $my_judul = get_the_title();
  13. if( ! empty( $my_linkcover ) ) {
  14. echo '<a href="http://adf.ly/665625/' . $my_linkcover . '" target="_blank"><img src="http://arsipkoran.tk/img/cover/' . $my_judul . '.jpg" title="Click to big cover ' . $my_judul . '" > </a>';
  15. }
  16. ?>
RAW Paste Data