2009-10-25 2 views
1

나는 여러 사용자와 WordPress 블로그를 실행하고있었습니다. 나는 authorlist.php 템플릿을 작성하여 페이지에있는 모든 저자 목록을 보여줍니다.WordPress - wp_list_authors 복수 저자 gravatar 및 생물 가져 오기

내 템플릿 코드는

<?php 
/* 
Template Name: Author List 
*/ 
?> 


<?php get_header(); ?> 

<div id="main"> 
    <div id="pageleft"> 

<?php if (have_posts()) : ?> 
<?php while (have_posts()) : the_post(); ?> 

<div class="main-page-container"> 
    <div class="page-top"></div> 
    <div class="page-container"> 
      <div class="authors-list"> 
       <h1><?php the_title(); ?></h1> 
<?php wp_list_authors('optioncount=1'); ?> 
      </div> 
      <div class="clear"> 
      </div> 
     </div> 
    <div class="page-bottom"> 
    </div> 


<?php endwhile; ?> 

<?php else : ?> 

<h2 class="center">Not Found</h2> 
<p class="center">Sorry, but you are looking for something that isn't here.</p> 

<?php endif; ?> 

<!--/index--> 
<br /> 
<?php get_footer(); ?> 

내가 wp_list_authors을 사용, 그래서 Gravatar에 각 사용자의 전기를 표시하는 옵션이 없습니다. 나는 그것을 보여주고 싶다. 나 좀 도와 줄 수있어? 감사. 내 하찮은 영어 실력에 죄송하다는 말씀을 드리고 싶습니다. 감사와

,

답변

0

이봐 친구, 아래 링크를 확인, 나는이 방법을 사용 지금 blogpage 및 저자 프로필 gravatars, 바이오, 각 저자에 대한 개별 링크와 저자의 목록을 가지고있다.

WordPress MU Forums Plugins and Hacks - List Authors

+0

안녕하세요, wordpress에서 작동합니까? 사촌 나는 마이크로 소프트 워드 프레스를 운영하고 있지 않다. 너 해봤 어? 어떤 코드? 나는 그 주제를보고 혼란 스럽다 : S. 론을 도와 줘서 고마워. – spotlightsnap

0

미안 내가 너무 내 전체 템플릿을 게시 한 권리를 통과하지 못할.

<?php 
/* 
Template Name: standard 
*/ 

get_header(); ?> 
<!-- This sets the $curauth variable --> 

    <?php 
    if(isset($_GET['author_name'])) : 
     $curauth = get_userdatabylogin($author_name); 
    else : 
     $curauth = get_userdata(intval($author)); 
    endif; 

    $curID = $curauth->ID; 




    ?> 
<div id="toolbarWrap"> 
    <div id="toolbarContainer" class="container_12"> 

     <div id="pageTitle" class="grid_12"> 
      <div id="roundedH1">     
       <b class="b1f"></b><b class="b2f"></b><b class="b3f"></b><b class="b4f"></b> 

       <div class="contentf"> 
       <div><h1>Staff Profile</h1></div> 
       </div> 

       <b class="b4f"></b><b class="b3f"></b><b class="b2f"></b><b class="b1f"></b> 
      </div> 
     </div><!-- /pageTitle --> 


     <div class="clear"></div> 

     <div id="tabRowWrap" class="grid_12"> 

        <?php include(TEMPLATEPATH . '/modules/breadcrumb.php'); ?> 

     </div><!-- /tabRowWrap --> 
    </div><!--/toolbarContainer --> 

</div><!-- /toolbarWrap --> 

<div id="mainContent" class="container_12"> 
    <div class="padTop"> 

    <div id="leftColumn" class="grid_9"> 

    <div id="panes"> 

     <div id="post"> 

      <div class="tabContent"> 
      <div class="author-profile vcard"> 
      <div class="grid_2 alpha"> 
       <?php echo get_avatar($curauth->user_email, '120', $avatar); ?> 


     <?php 


     $fullname = get_the_author_meta('first_name',$curID) + ' ' + get_the_author_meta('last_name',$curID); 
     $firstname = get_the_author_meta('first_name',$curID); 
     $nickname = get_the_author_meta('nickname',$curID); 
     $position = get_the_author_meta('position',$curID); 
     $hobbies = get_the_author_meta('hobbies',$curID); 
     $interests = get_the_author_meta('interests',$curID); 
     $modals = get_the_author_meta('modals',$curID); 
     $bio = get_the_author_meta('description',$curID); 

     $favfood = get_the_author_meta('favfood',$curID); 
     $song = get_the_author_meta('song',$curID); 
     $flower = get_the_author_meta('flower',$curID); 
     $pet = get_the_author_meta('pet',$curID); 
     $drink = get_the_author_meta('drink',$curID); 
     $favitem = get_the_author_meta('favitem',$curID); 
     $favsnack = get_the_author_meta('favsnack',$curID); 
     $favmovie = get_the_author_meta('favmovie',$curID); 
     $favactor = get_the_author_meta('favactor',$curID); 
     $motherquote = get_the_author_meta('motherquote',$curID); 

     ?> 

      </div> 

      <div class="grid_7 omega"> 
       <!-- Name and links --> 
       <div class="tabTitle"> 
        <h2><?php echo $curauth->first_name; ?> <?php echo $curauth->last_name; ?></h2><br /> 
        <h3><?php the_author_meta('position',$curID); ?></h3> 
       </div> 
       <td><p class="authorLinks"><a href="<?php bloginfo('url'); ?>/therapist-blogs/<?php echo $curauth->first_name; ?>-<?php echo $curauth->last_name; ?>">Blog</a> - <a href="mailto:<?php echo $curauth->user_email; ?>">Email</a></p> 
       <div class="clear"></div> 
       <br /> 

       <!-- Description --> 
       <?php if ($description) { ?> 
        <tr> 
       <th><h4>Bio:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $description; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

       <!-- Interests --> 
       <?php if ($interests) { ?> 
        <tr> 
       <th><h4>Interests:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $interests; ?> 

         </tr> 
       </p></td> 
       <?php }; ?> 

       <!-- Modals --> 
       <?php if ($modals) { ?> 
        <tr> 
       <th><h4>Modalities:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $modals; ?> 

        </tr> 
       </p></td> 
       <?php }; ?> 

       <!-- Hobbies --> 
       <?php if ($hobbies) { ?> 
        <tr> 
       <th><h4>Hobbies:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $hobbies; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

      <h3>60 Seconds with <?php echo $nickname; ?></h3> 


      <table class="quickProfile-Table"> 

       <!-- favfood --> 
       <?php if ($favfood) { ?> 
        <tr> 
       <th><h4>Favourite Food:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $favfood; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

       <!-- song --> 
       <?php if ($song) { ?> 
        <tr> 
       <th><h4>Favourite Song:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $song; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

       <!-- flower --> 
       <?php if ($flower) { ?> 
        <tr> 
       <th><h4>Favourite Flower:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $flower; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

       <!-- pet --> 
       <?php if ($pet) { ?> 
        <tr> 
       <th><h4>Favourite Pet:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $pet; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

       <!-- drink --> 
       <?php if ($drink) { ?> 
        <tr> 
       <th><h4>Favourite Drink:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $drink; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

       <!-- favitem --> 
       <?php if ($favsnack) { ?> 
        <tr> 
       <th><h4>Favourite Snack:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $favsnack; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

       <!-- favmovie --> 
       <?php if ($favmovie) { ?> 
        <tr> 
       <th><h4>Favourite Movie:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $favmovie; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

       <!-- favactor --> 
       <?php if ($favactor) { ?> 
        <tr> 
       <th><h4>Favourite Actor:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $favactor; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

       <!-- favitem --> 
       <?php if ($favitem) { ?> 

       <th><h4>Favourite thing to spend money on:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $favitem; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

       <!-- motherquote --> 
       <?php if ($motherquote) { ?> 
        <tr> 
       <th><h4>Something your mother always said:</h4></th> 
       <td><p class="author-description author-bio">      

        <?php echo $motherquote; ?> 

       </p></td> 
        </tr> 
       <?php }; ?> 

      </table> 


       <!-- Posts --> 

       <h3>Posts by <?php echo $curauth->nickname; ?>:</h3> 
       <?php if (have_posts()) : while (have_posts()) : the_post(); ?> 

       <ul> 
        <li> 
         <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"> 
         <?php the_title(); ?></a>, 
         <?php the_time('d M Y'); ?> in <?php the_category('&');?> 
        </li> 
       </ul> 

       <?php endwhile; else: ?> 
       <h3><?php _e('Sorry, no posts matched your criteria.'); ?></h3> 
       <?php endif; ?> 

      </div><!-- end grid_7 -->  
      </div><!-- end author-profile vcard --> 
      </div> 


     </div><!-- /post --> 
      <hr /> 



    </div><!-- /panes --> 

    <div class="clear"></div> 


    </div><!-- /leftcolumn--> 



<?php get_sidebar(); ?> 



</div><!-- /Padtop --> 
    <div class="clear"></div> 
</div><!--/mainContent--> 

    <div class="clear"></div> 
<div id="footer"> 

    <div id="footerToolbar"> 

    </div><!-- /footerToolbar --> 

    <div id="footerMain"> 

    </div><!-- /footerMain --> 


</div><!--/footer--> 

</div><!-- /page-container --> 
<div id="lowerSpacer"> 
<div class="loveLink"><a href="http://www.publikdesign.com" target="_blank" title="Website and graphic design on Phillip Island">Website designed and developed by Publik Design</a></div> 
</div> 
<div id="contactOverlay" class="simple_overlay"> 
    <div class="overlayContent"> 
     <div class="overlayHeaderBG"> 
      <div class="overlayHeader"> 
      <h3>Contact Us</h3> 
      </div><!-- /overlayHeader --> 
     </div><!-- /overlayHeaderBG --> 

     <div class="overlayBody"> 
     <p>Please take the time to fill out this form and we will get back to you as soon as possible.</p> 

     <div id="webform"> 
     <form> 

      <label for="user">Name</label> 

      <input type="text" name="user" value=""><br /> 

      <label for="emailaddress">Email Address:</label> 
      <input type="text" name="emailaddress" value="" /><br /> 

      <label for="comments">Comments:</label> 
      <textarea name="comments"></textarea><br /> 

      <label for="terms">Agree to Terms?</label> 
      <input type="checkbox" name="terms" class="boxes" /><br /> 

      <input type="submit" name="submitbutton" id="submitbutton" value="Submit" /> 

     </form> 
     </div> 

     </div><!-- /overlayBody --> 

    </div><!-- /overlayContent --> 
</div><!--/contactOverlay --> 

</body> 
</html> 
4

조금 늦게 및 롤 - 네 - 자신의 솔루션을하지만,이 질문을 다른 사람이이 기능의 Author Avatars 플러그인을 체크 아웃 할 수 있습니다이 없습니다.

관련 문제