Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
$20
Wordpress Author Biography no longer showing up
The code in single.php has not changed, but there is no output anymore on the site.
<div id="entry-author-info">
<div id="author-description">About the Author:<?php the_author_meta('description') ?>
</div>
</div>Here is a sample page: http://www.ghacks.net/2011/12/14/use-smart-defrag-for-accurate-defragmentation/
Other values, like the_author_meta('first_name') work on the site.
It is very important that I get the functionality back as soon as possible. Any help would be appreciated.
giacome | 12/16/11 at 7:21pm
Edit
Tutorial: How to assign prize money
(6) Possible Answers Submitted...
See a chronological view of answers?
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
-

Last edited:
12/16/11
8:06pmFrancisco Javier Carazo Gil says:Hi Giacome,
Have you seen the DB?
Try this in your SQL client:
SELECT *
FROM wp_usermeta
WHERE meta_key LIKE('description');
Tell me which is the result.- 12/17/11 3:02am
giacome says:Hi, I'm getting the descriptions displayed in the database. All showing up fine.
- 12/17/11 3:02am
-

Last edited:
12/16/11
8:15pmGabriel Reguly says:Hi giacome,
Unfortunately functions the_author_meta and get_the_author_meta have not changed from WordPress 3.2.1 to WordPress 3.3
So it must be something else.
Are you sure the data is at the database?
Regards,
Gabriel Reguly- 12/17/11 3:03am
giacome says:Yes the data is there.
- 12/17/11 5:28am
Gabriel Reguly says:Hi Giacome,
That is odd, please try this code:
<?php
global $authordata;
if ( !is_object( $authordata ) ) {
?>
<!-- Error: $authordata should be set -->
<?php
}
?>
<div id="entry-author-info">
<div id="author-description">About the Author:<?php the_author_meta('user_description', $authordata->ID ) ?></div>
</div>
If it does not bring back the Bio, then please check HTML source for the error.
Regards,
Gabriel - 12/17/11 6:14am
giacome says:Gabriel, the author bio and the error message are both not being displayed.
- 12/18/11 7:28am
Gabriel Reguly says:Hi Giacome,
The error message is not to be displayed, it is an HTML comment. To see it you will need to see the HTML source.
Please try another approach, try to save the author bio to variable at the start of the page and then use it later.
Like this:
<?php get_header(); ?>
<div class="main">
<!-- google_ad_section_start -->
<!-- Begin Content Section of <?php the_title(); ?> -->
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$author_bio = get_the_author_meta('user_description');
?>
<div class="article">
<h1>
<?php the_title(); ?>
</h1>
<div class="content" align="left">
<div style="float:left;margin-top:0px;margin-right:4px;"> ADSENSE </div>
<?php the_content('Read the rest of this entry »'); ?>
Enjoyed the article?: Then sign-up for our <a href="http://www.ghacks.net/ghacks-newsletter/">free newsletter</a> or <a href="http://www.ghacks.net/ghacksnet-feed-list/">RSS feed</a> to kick off your day with the latest technology news and tips, or share the article
with your friends and contacts on Facebook or Twitter.<br />
<br />
<div class='social'> <a href='http://www.facebook.com/sharer.php?u=<?php the_permalink() ?>' class='social_icon facebook' rel="nofollow"></a> <a href='https://twitter.com/share?url=<?php the_permalink() ?>' class='social_icon twitter' rel="nofollow"></a> <a class='social_icon googleplus' href="https://plusone.google.com/_/+1/confirm?hl=en&url=<?php the_permalink() ?>" rel="nofollow"></a> <a href='javascript:window.print()' class='social_icon print'></a>
<div style='clear:both'></div>
</div>
<?php related_posts(); ?>
<br />
Adsense<br />
<div id="entry-author-info">
<div id="author-description">About the Author:
<?php echo $author_bio; ?>
</div>
</div>
<p class="tags">Author:
<?php the_author_posts_link(); ?>
,
<?php the_time('l F j, Y'); ?>
- <br />
<?php if ( has_tag() ) { the_tags('Tags:', ', ', ''); } else { ?>
TAGS: <a href="<?php the_permalink(); ?>">None</a>
<?php } ?>
<br />
</p>
<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('<div id="breadcrumbs">','</div>');
}
?>
<div class="navigation">
<div class="alignleft"><b>Previous Post:</b>
<?php previous_post('%', '', 'yes'); ?>
</div>
<br />
<div class="alignleft"><b>Next Post:</b>
<?php next_post('%', '', 'yes'); ?>
</div>
<br />
Click on the following link(s) to read more about
<?php the_category(', ') ?>
</div>
<!-- end navigation -->
<br />
<div class="clr"></div>
<?php comments_template('', true); ?>
<!-- google_ad_section_end -->
</div>
</div>
<div class="clr"></div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft">
<?php next_posts_link('« Older Entries') ?>
</div>
<div class="alignright">
<?php previous_posts_link('Newer Entries »') ?>
</div>
</div>
<?php else : ?>
<div class="article">
<ul class="extendspost">
<li>Author: <a href="<?php echo get_settings('home'); ?>">404 Master</a></li>
<li>Published: <a href="<?php echo get_settings('home'); ?>">Apr. 4, 404 BC</a></li>
<li>Category: <a href="<?php echo get_settings('home'); ?>">Can't</a>, <a href="<?php echo get_settings('home'); ?>">Find</a>, <a href="<?php echo get_settings('home'); ?>">It</a></li>
<li>Comments: <a href="<?php echo get_settings('home'); ?>">None</a></li>
</ul>
<h1>Oh no! Article not found! 404 error!</h1>
<div class="clr marginbottom"></div>
<p class="tags">TAGS: <a href="<?php echo get_settings('home'); ?>">Are</a>, <a href="<?php echo get_settings('home'); ?>">You</a>, <a href="<?php echo get_settings('home'); ?>">Lost?</a></p>
<div class="content">
<p><span class="dropcap">W</span>e regret to inform you that the article or post you were looking is nowhere to be found. We agree that this is rather unfortunate. Luckily for you, we've implemented a handy search box into the top right hand corner or perhaps you'd rather check out our <a href="<?php echo get_settings('home'); ?>">homepage</a>? I can assure you that we are hunting down this 404 bug as you read this and it will be promptly corrected, unless you purposely typed in an incorrect URL, in that case, cut it out!</p>
<p class="tags">TAGS: <a href="<?php echo get_settings('home'); ?>">Are</a>, <a href="<?php echo get_settings('home'); ?>">You</a>, <a href="<?php echo get_settings('home'); ?>">Lost?</a></p>
</div>
</div>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<div class="clr"></div>
<?php get_footer(); ?>
If this does not work, then try with John Cotton's approach
<?php get_header(); ?>
<div class="main">
<!-- google_ad_section_start -->
<!-- Begin Content Section of <?php the_title(); ?> -->
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$author_meta = get_the_author_meta('user_description');
$author_bio = $author_meta['description'][0];
?>
<div class="article">
<h1>
<?php the_title(); ?>
</h1>
<div class="content" align="left">
<div style="float:left;margin-top:0px;margin-right:4px;"> ADSENSE </div>
<?php the_content('Read the rest of this entry »'); ?>
Enjoyed the article?: Then sign-up for our <a href="http://www.ghacks.net/ghacks-newsletter/">free newsletter</a> or <a href="http://www.ghacks.net/ghacksnet-feed-list/">RSS feed</a> to kick off your day with the latest technology news and tips, or share the article
with your friends and contacts on Facebook or Twitter.<br />
<br />
<div class='social'> <a href='http://www.facebook.com/sharer.php?u=<?php the_permalink() ?>' class='social_icon facebook' rel="nofollow"></a> <a href='https://twitter.com/share?url=<?php the_permalink() ?>' class='social_icon twitter' rel="nofollow"></a> <a class='social_icon googleplus' href="https://plusone.google.com/_/+1/confirm?hl=en&url=<?php the_permalink() ?>" rel="nofollow"></a> <a href='javascript:window.print()' class='social_icon print'></a>
<div style='clear:both'></div>
</div>
<?php related_posts(); ?>
<br />
Adsense<br />
<div id="entry-author-info">
<div id="author-description">About the Author:
<?php echo $author_bio; ?>
</div>
</div>
<p class="tags">Author:
<?php the_author_posts_link(); ?>
,
<?php the_time('l F j, Y'); ?>
- <br />
<?php if ( has_tag() ) { the_tags('Tags:', ', ', ''); } else { ?>
TAGS: <a href="<?php the_permalink(); ?>">None</a>
<?php } ?>
<br />
</p>
<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('<div id="breadcrumbs">','</div>');
}
?>
<div class="navigation">
<div class="alignleft"><b>Previous Post:</b>
<?php previous_post('%', '', 'yes'); ?>
</div>
<br />
<div class="alignleft"><b>Next Post:</b>
<?php next_post('%', '', 'yes'); ?>
</div>
<br />
Click on the following link(s) to read more about
<?php the_category(', ') ?>
</div>
<!-- end navigation -->
<br />
<div class="clr"></div>
<?php comments_template('', true); ?>
<!-- google_ad_section_end -->
</div>
</div>
<div class="clr"></div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft">
<?php next_posts_link('« Older Entries') ?>
</div>
<div class="alignright">
<?php previous_posts_link('Newer Entries »') ?>
</div>
</div>
<?php else : ?>
<div class="article">
<ul class="extendspost">
<li>Author: <a href="<?php echo get_settings('home'); ?>">404 Master</a></li>
<li>Published: <a href="<?php echo get_settings('home'); ?>">Apr. 4, 404 BC</a></li>
<li>Category: <a href="<?php echo get_settings('home'); ?>">Can't</a>, <a href="<?php echo get_settings('home'); ?>">Find</a>, <a href="<?php echo get_settings('home'); ?>">It</a></li>
<li>Comments: <a href="<?php echo get_settings('home'); ?>">None</a></li>
</ul>
<h1>Oh no! Article not found! 404 error!</h1>
<div class="clr marginbottom"></div>
<p class="tags">TAGS: <a href="<?php echo get_settings('home'); ?>">Are</a>, <a href="<?php echo get_settings('home'); ?>">You</a>, <a href="<?php echo get_settings('home'); ?>">Lost?</a></p>
<div class="content">
<p><span class="dropcap">W</span>e regret to inform you that the article or post you were looking is nowhere to be found. We agree that this is rather unfortunate. Luckily for you, we've implemented a handy search box into the top right hand corner or perhaps you'd rather check out our <a href="<?php echo get_settings('home'); ?>">homepage</a>? I can assure you that we are hunting down this 404 bug as you read this and it will be promptly corrected, unless you purposely typed in an incorrect URL, in that case, cut it out!</p>
<p class="tags">TAGS: <a href="<?php echo get_settings('home'); ?>">Are</a>, <a href="<?php echo get_settings('home'); ?>">You</a>, <a href="<?php echo get_settings('home'); ?>">Lost?</a></p>
</div>
</div>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<div class="clr"></div>
<?php get_footer(); ?>
Good luck,
Gabriel
- 12/18/11 3:36pm
giacome says:Gabriel,
the first is not working, the second returns a php error.
- 12/17/11 3:03am
-

Last edited:
12/17/11
12:56amManoj Raj says:Hi,
My question is same as the above two..
Do you see "bio" data associated with each author in the database ?
- 12/17/11 2:10am
Manoj Raj says:Can you post the full single.php code here?
If you have the description stored in the database, try the following (Just trial-and-error)
1) Replace
<?php the_author_meta('description') ?>
with this
<?php the_author_meta( 'description', $userID ); ?>
Note: Replace $userID with the corresponding person's userid..
Check whether it is working?
What are the roles assigned to the authors? - 12/17/11 3:12am
giacome says:I tried that yesterday but it was not working either. The full single.php is this:
<?php get_header(); ?>
<div class="main">
<!-- google_ad_section_start -->
<!-- Begin Content Section of <?php the_title(); ?> -->
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="article">
<h1><?php the_title(); ?></h1>
<div class="content" align="left">
<div style="float:left;margin-top:0px;margin-right:4px;">
ADSENSE
</div>
<?php the_content('Read the rest of this entry »'); ?>
Enjoyed the article?: Then sign-up for our <a href="http://www.ghacks.net/ghacks-newsletter/">free newsletter</a> or <a href="http://www.ghacks.net/ghacksnet-feed-list/">RSS feed</a> to kick off your day with the latest technology news and tips, or share the article
with your friends and contacts on Facebook or Twitter.<br /><br />
<div class='social'>
<a href='http://www.facebook.com/sharer.php?u=<?php the_permalink() ?>' class='social_icon facebook' rel="nofollow"></a>
<a href='https://twitter.com/share?url=<?php the_permalink() ?>' class='social_icon twitter' rel="nofollow"></a>
<a class='social_icon googleplus' href="https://plusone.google.com/_/+1/confirm?hl=en&url=<?php the_permalink() ?>" rel="nofollow"></a>
<a href='javascript:window.print()' class='social_icon print'></a>
<div style='clear:both'></div>
</div>
<?php related_posts(); ?>
<br />
Adsense<br />
<div id="entry-author-info">
<div id="author-description">About the Author:<?php the_author_meta('user_description') ?>
</div>
</div>
<p class="tags">Author: <?php the_author_posts_link(); ?>, <?php the_time('l F j, Y'); ?> - <br /><?php if ( has_tag() ) { the_tags('Tags:', ', ', ''); } else { ?>TAGS: <a href="<?php the_permalink(); ?>">None</a><?php } ?><br /></p>
<?php if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('<div id="breadcrumbs">','</div>');
} ?>
<div class="navigation">
<div class="alignleft"><b>Previous Post:</b>
<?php previous_post('%',
'', 'yes'); ?>
</div><br />
<div class="alignleft"><b>Next Post:</b>
<?php next_post('%',
'', 'yes'); ?>
</div>
<br />
Click on the following link(s) to read more about <?php the_category(', ') ?>
</div> <!-- end navigation --><br />
<div class="clr"></div>
<?php comments_template('', true); ?>
<!-- google_ad_section_end -->
</div></div>
<div class="clr"></div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
<?php else : ?>
<div class="article">
<ul class="extendspost">
<li>Author: <a href="<?php echo get_settings('home'); ?>">404 Master</a></li>
<li>Published: <a href="<?php echo get_settings('home'); ?>">Apr. 4, 404 BC</a></li>
<li>Category: <a href="<?php echo get_settings('home'); ?>">Can't</a>, <a href="<?php echo get_settings('home'); ?>">Find</a>, <a href="<?php echo get_settings('home'); ?>">It</a></li>
<li>Comments: <a href="<?php echo get_settings('home'); ?>">None</a></li>
</ul>
<h1>Oh no! Article not found! 404 error!</h1>
<div class="clr marginbottom"></div>
<p class="tags">TAGS: <a href="<?php echo get_settings('home'); ?>">Are</a>, <a href="<?php echo get_settings('home'); ?>">You</a>, <a href="<?php echo get_settings('home'); ?>">Lost?</a></p>
<div class="content">
<p><span class="dropcap">W</span>e regret to inform you that the article or post you were looking is nowhere to be found. We agree that this is rather unfortunate. Luckily for you, we've implemented a handy search box into the top right hand corner or perhaps you'd rather check out our <a href="<?php echo get_settings('home'); ?>">homepage</a>? I can assure you that we are hunting down this 404 bug as you read this and it will be promptly corrected, unless you purposely typed in an incorrect URL, in that case, cut it out!</p>
<p class="tags">TAGS: <a href="<?php echo get_settings('home'); ?>">Are</a>, <a href="<?php echo get_settings('home'); ?>">You</a>, <a href="<?php echo get_settings('home'); ?>">Lost?</a></p>
</div>
</div>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<div class="clr"></div>
<?php get_footer(); ?>
- 12/17/11 3:13am
giacome says:author roles are different, one is admin, some are editors.
- 12/17/11 3:25am
giacome says:Oh, and adding the user ID is also not working.
- 12/17/11 4:39am
Manoj Raj says:Try removing the <?php related_posts(); ?> and check whether it is working because it is the function before displaying author description..
Or add <?php
wp_reset_query(); ?> after <?php related_posts(); ?>
related_posts() -> Is this function a plugin or your own? - 12/17/11 6:16am
giacome says:reset query does not resolve the issue. The related posts entry is from the YARPP plugin.
- 12/17/11 6:57am
Manoj Raj says:let us try one more thing..
<div id="entry-author-info">
<div id="author-description">About the Author:<?php the_author_meta('description') ?>
</div>
</div>
Try pasting the above code soon after
<div class="article">
Check whether it is working?
- 12/18/11 3:10pm
giacome says:This is not working.
- 12/17/11 2:10am
-

Last edited:
12/17/11
1:29amArnav Joy says:try using this
<?php the_author_meta('user_description') ?>- 12/17/11 3:13am
giacome says:This is not working unfortunately.
- 12/17/11 3:34am
Arnav Joy says:ok then , deactivate all of your plugins then run your code , try it.
- 12/17/11 3:45am
giacome says:Deactivating plugins had no effect. I just checked the parameters for the command, some are working, e.g. first_name or last_name while others are not, e.g. description, user_description or user_firstname and user_lastname
- 12/17/11 4:12am
Arnav Joy says:please try
wp_reset_query();
as follows
<?php
wp_reset_query();
the_author_meta('user_description')
// or this
the_author_meta('description')
wp_reset_query();
?> - 12/17/11 4:18am
Arnav Joy says:also please try in your wp-config.php
define('WP_DEBUG', true);
if it false there , may be you will get some error or any info. - 12/17/11 4:36am
Arnav Joy says:try this code
// get author id from this code
$author_id = get_the_author_meta('ID') ;
// if can not get author id from above method then use following method.
global $post;
$author_id = $post->post_author;
$user_info = get_userdata($author_id);
echo $description = $user_info->user_description;
- 12/17/11 4:43am
Arnav Joy says:try these plugins:--
http://wordpress.org/extend/plugins/wp-biographia/
http://wordpress.org/extend/plugins/author-bio/
- 12/17/11 3:13am
-

Last edited:
12/17/11
7:39amJohn Cotton says:Just after this line in your single.php
<div class="article">
add this:
global $post;
$ameta = get_user_meta($post->post_author);
print_r($ameta);
Does the author description show up in that dump?
- 12/17/11 10:42am
giacome says:Yes it does John
- 12/17/11 10:55am
John Cotton says:In which case, it could be something grabbing the filter and blanking it out but that would be very odd. But your quick fix is to output $ameta['description'][0] in place of the author meta function.
- 12/17/11 12:55pm
John Cotton says:...then you could spend a little time tracking down whatever is wipeing out your description value...
- 12/18/11 3:11pm
giacome says:This does not work either, unfortunately. Something seems to be filtering out the description on the page.
- 12/17/11 10:42am
-

Last edited:
12/18/11
8:21amChristianto says:Hi,
If the ID of the author can be returned by the function (get_the_author_meta() or the_author_meta()), you can use get_userdata():
<?php
$current_author = get_userdata(get_the_author_meta('ID'));
?>
<div id="entry-author-info">
<div id="author-description">
About the Author:<?php echo $current_author->user_description; ?>
</div>
</div>
more info on wordpress codex page.Previous versions of this answer: 12/18/11 at 8:21am
- 12/18/11 3:09pm
giacome says:This is not displaying anything either, unfortunately.
- 12/18/11 3:09pm
This question has expired.
Current status of this question: Community pot
Please log in to add additional discourse to this page.
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
