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

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.