Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

[SOLVED] How to Add Author Description to Page generated by "%author-posts-link%"


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Dec 15, 2010, 02:45 AM
Steve41
 
10 posts · Dec 2010
In my old theme, when you clicked on the Author's name in the byline, that took you to an "authors page" that had at the top the bio for the author and then a list of their posts. Not sure how I can do this with this theme. Any help appreciated.

The code in the old theme to grab the 'user_description' was:
PHP Code:
<?php
if(get_query_var('author_name')) :
    
$curauth get_user_by('slug'get_query_var('author_name'));
else :
    
$curauth get_userdata(get_query_var('author'));
endif;
?>

<h3>About<?php echo $curauth->nickname?></h3>
    <dl>
        <dt>Website</dt>
        <dd><a href="<?php echo $curauth->user_url?>"><?php echo $curauth->user_url?></a></dd>
        <dt>Profile</dt>
        <dd><?php echo $curauth->user_description?></dd>
    </dl>
  <h3>Posts by <?php echo $curauth->nickname?>:</h3>

    <ul>



        <?php if (have_posts()) : ?>

       <?php $post $posts[0]; // Hack. Set $post so that the_date() works. ?>
       <?php /* If this is a category archive */ if (is_category()) { ?>
        <h3 class="pagetitle">Archive for the <?php single_cat_title(); ?> Category</h3>
       <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
        <h3 class="pagetitle">Posts Tagged <?php single_tag_title(); ?></h3>
       <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
        <h3 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h3>
       <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
        <h3 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h3>
       <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
        <h3 class="pagetitle">Archive for <?php the_time('Y'); ?></h3>
      <?php /* If this is an author archive */ } elseif (is_author()) { ?>
        <h3 class="pagetitle">Author Archive</h3>
       <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
        <h3 class="pagetitle">Blog Archives</h3>
       <?php ?>

        <?php while (have_posts()) : the_post(); ?>
Appreciate any help on this please
  #2  
Old Dec 15, 2010, 04:20 AM
juggledad's Avatar
juggledad
 
21,982 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
this will give you part of it. Add the following to the bottom of ATO->Style & edit CENTER COLUMN->Content ABOVE the LOOP
HTML Code:
<?php if (is_author()) { ?>
<h3>About: <?php the_author(); ?></h3> 
    <dl> 
        <dt>Website</dt> 
        <dd> <?php the_author_link(); ?></dd> 
        <dt>Profile</dt> 
        <dd><?php the_author_meta('description'); ?></dd> 
    </dl> 
  <h3>Posts by <?php the_author(); ?>:</h3> 

<?php }; ?>
this will not break it down by archive/category etc, but it will list the posts
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support
  #3  
Old Dec 15, 2010, 02:28 PM
Steve41
 
10 posts · Dec 2010
Thanks for that, it didn't work as posted (didn't retrieve any data), but it gave me the idea how to fix it. Not elegant, but then I'm not a programmer
Solution:
PHP Code:
<?php
if(is_author()) {
if(
get_query_var('author_name')) :
    
$curauth get_user_by('slug'get_query_var('author_name'));
else :
    
$curauth get_userdata(get_query_var('author'));
endif;
echo 
'About:'.$curauth->nickname;
echo 
'<dl><dt>Website</dt><dd><a href="'.$curauth->user_url.'">'.$curauth->user_url.'</a></dd>';
echo 
'<dt>Profile</dt><dd>'.$curauth->user_description.'</dd></dl>';
 } 
 
?>
  #4  
Old Dec 15, 2010, 03:46 PM
juggledad's Avatar
juggledad
 
21,982 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
odd, it works fine for me - might be a release issue, but if your version works great.
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I add a "Back to top" link on the site? lmilesw Tips 0 Oct 25, 2010 12:52 PM
Styling %author% and %author-posts-link% Aris Post-Kicker, -Byline & -Footer 2 Jul 6, 2010 10:34 PM
[SOLVED] How to add additional link beside the &quot;home&quot; page above logo? cordi Other BFA WordPress Themes 2 Apr 8, 2010 11:21 AM
%author-linked% and "All posts by this author" David Latapie Post-Kicker, -Byline & -Footer 2 Nov 1, 2009 06:53 PM
[SOLVED] How to apply &quot;strong&quot; to the comments author name? wmoura Comments, trackbacks & pings 2 Jun 16, 2009 04:05 AM


All times are GMT -6. The time now is 01:24 AM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.