PDA

View Full Version : Wordpress author.php



Juc1
12 Jun 2010, 05:51 AM
Hey all,

I copied the sample author.php from the codex (http://codex.wordpress.org/Author_Templates) but I think it displays correctly for only the default theme and not necessarily any other theme. In my theme, the author pages display with a very big font (http://www.juc1.byethost24.com/francis/?author=3)which messes up the page. Can anyone please suggest any changes I should make to author.php?


Thank you...



author.php =



<?php get_header(); ?>

<div id="content" class="narrowcolumn">

<!-- This sets the $curauth variable -->

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

<h2>About: <?php echo $curauth->nickname; ?></h2>
<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>

<h2>Posts by <?php echo $curauth->nickname; ?>:</h2>

<ul>
<!-- The Loop -->

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<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>

<?php endwhile; else: ?>
<p><?php _e('No posts by this author.'); ?></p>

<?php endif; ?>

<!-- End Loop -->

</ul>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>



index.php =


<?php get_header(); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="post-header">
<div class="date"><?php the_time(__ ( 'M j', 'titan')); ?> <span><?php the_time( 'y' ); ?></span></div>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="author"><?php printf(__ ( 'by %s', 'titan'), get_the_author()); ?></div>
</div><!--end post header-->
<div class="entry clear">
<?php if ( function_exists( 'add_theme_support' ) ) the_post_thumbnail( array(250,9999), array( 'class' => ' alignleft border' )); ?>
<?php the_content(__( 'read more...', 'titan')); ?>
<?php edit_post_link(__( 'Edit', 'titan')); ?>
<?php wp_link_pages(); ?>
</div><!--end entry-->
<div class="post-footer">
<div class="comments"><?php comments_popup_link(__ ( 'Leave a comment', 'titan'), __ ( '1 Comment', 'titan'), __ngettext ( '% Comment', '% Comments', get_comments_number (),'titan')); ?></div>
</div><!--end post footer-->
</div><!--end post-->
<?php endwhile; /* rewind or continue if all posts have been fetched */ ?>
<div class="navigation index">
<div class="alignleft"><?php next_posts_link(__ ( '&laquo; Older Entries', 'titan')); ?></div>
<div class="alignright"><?php previous_posts_link(__ ( 'Newer Entries &raquo;', 'titan')); ?></div>
</div><!--end navigation-->
<?php else : ?>
<?php endif; ?>
</div><!--end content-->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

katierosy
14 Jun 2010, 06:50 AM
It will be good for you to take help of a someone in php programming, close to you.
If difficult to find, please read the author.php attentively, to know line number which is causing the font issues.

I hope that you will find it.