WordPress.org

Ready to get started?Download WordPress

Forums

Author pages for each author (6 posts)

  1. Monarch
    Member
    Posted 6 years ago #

    I am trying to do what I thought would be easy. I want to have separate author pages for each of the authors in my multi-auhtor blog.

    I am currently using the <!-- This sets the $curauth & $authid variables --> and the information goes to the author.php page.

    Is what I am trying to do impossible?

    If not where would I save the author pages? What should the save as named? Authro1.php? 1.php?

    Thanks in advance for your help.

  2. moshu
    Member
    Posted 6 years ago #

    This should help:
    Author_Templates
    I recommend that you read ALL the resources offered at the bottom of that page!

  3. abidavis
    Member
    Posted 5 years ago #

    I am wondering how to do this too and I can't find the information I need via the link listed above or from searching the web for hours.

    What I would like to do is have two or three author templates which I can assign to my blog authors. I want some authors to be able to show their lifestreams and others to just display posts and others to just display posts and videos.

    This is what I would like to happen:

    Click on the author and then it queries -

    if author id 1, 2, 3 go to author1.php
    elseif author id 4,5,6 go to author2.php
    elseif author id 7,8,9 go to author3.php

    Is this possible?

    Thank you

  4. bookchiq
    Member
    Posted 5 years ago #

    @abidavis: It's possible, but it's not particularly easy. You basically have to create a plugin (or a function within the functions.php file) that intercepts the page loading process (using the template_redirect hook), have it do some conditional logic, and then serve up the appropriate page.

    Someone could probably write a plugin to make it easier (for instance, provide a settings panel in the WP-Admin) but I'm not aware of existing plugin.

  5. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    abidavis, I haven't used nor tested this plugin, but it looks good for what you want to implement for the authors' posts
    http://wordpress.org/extend/plugins/post-template/
    Good luck.

  6. abidavis
    Member
    Posted 5 years ago #

    Hi

    Thank you for this info.

    What I ended using, with a colleagues help figuring it out, is to create custom templates for each author, then create a page for each author and link the page to the authors template. Set each author page as a child of the 'Authors' page.

    When I set up a user I make sure the nickname is setup as the slug

    Then in the blog I reference:

    <a href="authors/<?php the_author_nickname() ?>/"><?php the_author() ?></a>

    This then takes me to the correct author page.

    Then to list the site authors, I can reference the child of authors:

    <h2>Authors</h2>
    <ul class="nomargins"><?php wp_list_pages('title_li=&child_of=3'); ?></ul>

    and it gives me a list of authors for the sidebar.

    There seems like there should be an easier way to add more custom info to an author page but this solution does give me the freedom to put different info on each author page. So some authors who are more into using the web so use twitter and facebook and flickr etc can share this stuff but then the ones who don't use it don't have to share it. Also if one wants to share their youtube vids, they can and the others don't have to.

    If anyone does come up with a different solution to do the same thing I would love to know about it.

    Thank you again

Topic Closed

This topic has been closed to new replies.

About this Topic