• Hello, I’m trying to turn the author.php, from the weaver template in a user profile description page in order to use it with a user list plugin. The fact of the matter being that I’m currently not that good with php and now I’m stuck, can anybody tell me what I’m doing wrong in this code ? (I’m trying to define the author page as a user description page. I’ve created custom entries in my profile page).

    <?php
    /**
     * The template for displaying Author Archive pages.
     *
     * @package WordPress
     * @subpackage Weaver II
     * @since Weaver II 1.0
     */
    
    weaverii_get_header('author');
    if ( weaverii_getopt('wii_infobar_location') == 'top' ) get_template_part('infobar');
    weaverii_inject_area('premain');
    echo("\t<div id=\"main\">\n");
    weaverii_trace_template(__FILE__);
    weaverii_get_sidebar_left('author');
    ?>
    		<div id="container_wrap"<?php weaverii_get_page_class('author'); ?>>
    <?php		if (weaverii_getopt('wii_infobar_location') == 'content') get_template_part('infobar');
    		weaverii_inject_area('precontent'); ?>
    		<section id="container">
    <?php		weaverii_get_sidebar_top('author'); ?>
    			<div id="content" role="main" class="narrowcolumn">
    
    <div id="content" class="narrowcolumn">
    
    <!-- This sets the $curauth variable -->
    
        <?php
        $curauth = (get_user_meta($user_id, $key = '', $single = false));
        ?>
    
        <h2><?php echo $curauth->nickname; ?></h2>
        <dl>
            <dt><?php echo get_avatar( get_user_meta($user_id), 100 ); ?></dt>
    
            <dt>Full Name</dt>
            <dd>First Name : <?php echo $curauth->firt_name; ?></dd>
            <dd>Last Name : <?php echo $curauth->last_name; ?></dd>
    
            <dt>Professional Satus</dt>
            <dd>Position : <?php echo $curauth->position; ?></dd>
            <dd>Department : <?php echo $curauth->department; ?></dd>
            <dd>Organization : <?php echo $curauth->Organization; ?></dd>
    
            <dt>Profile</dt>
            <dd><?php echo $curauth->user_description; ?></dd>
    
            <dt>Location</dt>
            <dd>City : <?php echo $curauth->city; ?></dd>
            <dd>Country : <?php echo $curauth->country; ?></dd>
    
            <dt>Contact Methods</dt>
            <dd>E-mail : <?php echo $curauth->email; ?></dd>
            <dd>LinkedIn : <?php echo $curauth->linked_in; ?></dd>
            <dd>Facebook : <?php echo $curauth->facebook; ?></dd>
    
            <dt>Website</dt>
            <dd><a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a></dd>
    
            <dt>Seminar Attended</dt>
            <dd><?php echo $curauth->seminar_attended; ?></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; ?>
    
        </ul>
    </div>
    		</div><!-- #container_wrap -->
    
    <?php 	weaverii_get_sidebar_right('author');
    	weaverii_get_footer('author');
    ?>

    Any help or simple tip would be greatly appreciated, thanks in advance.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Transform the Author.php in a User Description file’ is closed to new replies.