• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2672

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Contact
  • Tags
  • Log in

Premium Member? - Request custom code

Custom Author Archive Templates In Genesis

A member of the Genesis community asked :

How do you create a custom Author Archive template for your Genesis child theme? I’ve been looking in Google for a while and I’m turning up blanks. Found plenty of stuff for specific category archives, but not authors.

Creating author templates in Genesis is simple. All you need to do is follow the WordPress Template Hierarchy when naming your author templates :

The Template Hierarchy specifies that WordPress uses the first Template file it finds in your child themes directory from the following list:

  1. author-{nicename}.php – If the author’s nice name were brad, WordPress would look for author-brad.php.
  2. author-{id}.php – If the author’s ID were 1, WordPress would look for author-1.php.
  3. author.php

Here’s a author template which uses a specific author I.D

You can grab the author I.D from the body classes in the source code of your author archive page like this :

If you want to use a author.php template for all authors, use this example instead :

Once you create your author template file, upload it to the root directory of your Genesis child theme and it will load for your author/authors.

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Brad Dalton Specializes In Genesis child theme customization & code modification. Read More…

Learn PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems