WordPress.org

Ready to get started?Download WordPress

Forums

Fancier Author Box by ThematoSoup
[resolved] Call the Custom Profile Fields on Template? (4 posts)

  1. The Gal
    Member
    Posted 1 year ago #

    I've been struggling to figure out how to do this for days now, but somehow I can't seem to get it right.

    I'm wanting to draw the values inputted with Fancier Author Box's custom fields onto a template. I started by looking at the plugin code and seeing if I could copy how the fields are called within the box itself. That did nothing.
    I've fiddled with both get_user_meta and the_author_data, using the names of the fields given in the plugin. But I must be calling it incorrectly because it simply doesn't show up when I check it. Other parts of my custom code (completely unrelated to the FAB fields) pull up perfectly, just not the FAB portion.

    Here's what I have, with currently an empty space in between <ul class="connect"></ul>.

    <div id="authorlist clearfix">
    			<ul>
    			<?php
    			    $blogusers = get_users('orderby=nicename&role=author');
    			    foreach ($blogusers as $user) { ?>
    			    	<li>
    			    	<a href="<?php echo get_bloginfo('url')."/author/"; the_author_meta('user_nicename', $author->ID); ?>"><?php echo get_avatar(get_the_author_meta('user_email', $author->post_author), 80); ?></a>
    			    	<a href="<?php echo get_bloginfo('url')."/author/"; the_author_meta('user_nicename', $author->ID); ?>"><?php echo the_author_meta('display_name', $author->ID); ?></a>
    			    	<br />
    			    	Website: <a href="<?php echo the_author_meta('user_url', $author->ID);?>" target="_blank"><?php echo the_author_meta('user_url', $author->ID);?></a>
    				<?php if(get_the_author_meta('description', $author->post_author)): ?>
    				<div class="description">
    								<p><?php the_author_meta('description', $author->post_author); ?></p>
    				</div>
    				<?php endif; ?>
    				<?php $recentPost = new WP_Query('author='.$author->post_author.'&showposts=1');
    							while($recentPost->have_posts()): $recentPost->the_post(); ?>
    				<h4>Recent Post: <a href="<?php the_title();?>"><?php the_title(); ?></a></h4>
    				<?php endwhile; ?>
    
    					<ul class="connect">
    
    					</ul>
    								  	<br />
    			    	<a href="<?php get_bloginfo('url')."/author/"; the_author_meta('user_nicename', $author->ID); ?>">Visit <?php echo the_author_meta('display_name', $author->ID); ?>'s Profile Page</a>
    			    	</li>
    			    <?php }
    ?>
    </ul>
    			</div>

    Any hints on how to accomplish this?

    Thanks so much!!!

  2. Slobodan Manic
    Member
    Plugin Author

    Posted 1 year ago #

    This one works:

    <?php the_author_meta( 'ts_fab_twitter', $author->ID ); ?>

    Let me know if that helps.

  3. The Gal
    Member
    Posted 1 year ago #

    You rock!!! Thank you so much! Absolutely perfect!

  4. Slobodan Manic
    Member
    Plugin Author

    Posted 1 year ago #

    Glad I could help :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic