• 22-09-2018, 15:15:17
    #1
    Merhaba, php bilgim olmadığı için yapamıyorum aşağıda bulunan else echo'nun href kısmına en altta verdiğim php kodunu nasıl kullanabilirim?

    	<?php
    if ( is_user_logged_in() ) {
        echo '<a href="www.site.com" class="button" style="margin-top: 10px; margin-left: 12px;">My Posts</a>';
    } else {
        echo '<a class="button" style="margin-top: 10px; margin-left: 12px;" href="YAZMAK İSTEDİĞİM PHP KODU BURAYA GELECEK">Users Posts</a>';
    }
    ?>
    YAZMAK İSTEDİĞİM KOD:
    <?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>
  • 22-09-2018, 15:17:15
    #2
    PHP - WORDPRESS - YAZILIM
    $p = get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) );

    echo '<a class="button" style="margin-top: 10px; margin-left: 12px;" href="'.$p.'">Users Posts</a>';
  • 22-09-2018, 15:26:59
    #3
    @metin_nn teşekkür ederim hocam çalıştı.