Wordpress Author TemplateA Wordpress Author Template
If, for example, a user chooses a linked author, he or she will be redirected by default to a page that lists the contributions of that particular author in order of chronology, from the most recent at the top to the oldest at the bottom. Plenty of viewing options are available, as well as the question of whether to show the entire article or extracts from the article and what extra information to show (title, categories, publication date, most recently changed date, etc.).
Describes how to make changes to what happens when the Blogs viewers visit one of the author pages of your website. So if you're new to template archives, you might want to start by reading the sections Using Themes and Stepping Into Templates. You have many ways to customize the look and feel of your author pages.
There are some that are not really author page oriented, such as the addition of text to the top of the page; you can see about such easy changes in the Category Templates section. The present paper will focus on changes that are specifically for author template file. When using author pages, you will probably want to make sure that a contribution, when viewed, has a hyperlink to the author page.
In the loop you can create this hyperlink by using the_author_posts_link template tag. A further way to create hyperlinks to author pages is to create an author listing in your page bar (or elsewhere in your design). This is done by the template tag ''wp_list_authors''. Simply place the following in your side bar template file:
It is possible to modify the appearance of the author listing by using the argument in wp_list_authors(). Normally, writers without contributions are ignored, but in this example all writers (users), as well as the administrators, are shown. What template file is used? Well, since you have hyperlinks to author pages, the next stage in changing their appearance is to find out which of your topic's file types should be used to view the post.
It is called the template tree. When it comes to writers, the hierarchies are quite straightforward. So if you want to modify the appearance of your author pages, you need to make an autor. php if it doesn't already exisit by copy the archives. pdf if this is the case, or index. pdf if it doesn't exisit.
Most of the remainder of the paper will assume that you are modifying the autor.php files. In this section, you will learn how to attach author information, such as name, biographical and social information, to an author page. You do this by creating a variables named $curauth (Current Author). Usually the way to do this is to insert the following rows before The Loop into your template file:
The following is 5 or higher: $wp_query globally; $curauth = $wp_query->get_queried_object(); After you have created the $curauth variables, you can use them to view all types of information about the author whose page is being called. You can use the author's alias to show it in a form like "This is Joe's page", for example:
Please be aware that after the definition of $curauth as in the preceding section and before The Loop, this must be placed in your template files. Besides the author's name, there is a lot of other information you can view. E.g. to show the name and the author's text (e.g. "About yourself" text): Here is a full example author.