Results 1 to 2 of 2

Thread: Wordpress author.php

  1. #1
    Join Date
    Apr 2010
    Location
    UK
    Posts
    44

    Wordpress author.php

    Hey all,

    I copied the sample author.php from the codex 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 which messes up the page. Can anyone please suggest any changes I should make to author.php?


    Thank you...



    author.php =


    PHP Code:
    <?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 Code:
    <?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
    (); ?>
    Last edited by Juc1; 12 Jun 2010 at 06:31 PM.

  2. #2
    Join Date
    Mar 2010
    Posts
    18

    Smile

    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.

Similar Threads

  1. Wordpress and user access control
    By Shinyhead in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 10 Nov 2009, 10:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •