0

I am having a problem when I try open url /author I always get 404.

For example if I open url

http://example.com/author/author-1 - OK
http://example.com/author/ - 404 why?

I try to create page-author.php and resave permalink, but get same result. Also in rewrite rules I see default values

    object(WP_Rewrite)#3250 (24) {
  ["permalink_structure"]=>
  string(36) "/%year%/%monthnum%/%day%/%postname%/"
  ["use_trailing_slashes"]=>
  bool(true)
  ["author_base"]=>
  string(6) "author"
  ["search_base"]=>
  string(6) "search"
  ["comments_base"]=>
  string(8) "comments"
  ["pagination_base"]=>
  string(4) "page"
  ["comments_pagination_base"]=>
  string(12) "comment-page"
  ["feed_base"]=>
  string(4) "feed"
  ["front"]=>
  string(1) "/"
  ["root"]=>
  string(0) ""
  ["index"]=>
  string(9) "index.php"
  ["matches"]=>
  string(0) ""
  ["rules"]=>
  NULL
  ["extra_rules"]=>
  array(0) {
  }

What I can do to see my author page ( author page with list of author )?

1

Your example would be accurate if we were talking about a post type, but authors behave a little differently. WordPress automatically creates specific author pages (like your /author-1 example) but does not have a fallback scenario for showing a list of the authors. (More details on how the template hierarchy works can be found here)

So, you'll need to use a 3rd party plugin to generate an author list, or create your own. You ca create a page template and use the wp_list_authors() function (documentation) to generate a list of your authors (you can usually adapt your archive template to fit this use case fairly easily). Check out this Smashing Mag article for a more detailed walk through.

  • This is standard author.php page, I don't have post type author. I createa author.php to show author posts and this template work good. But I don't know which template I need use to show all author in one page. I no need code, I only want to know why I can't use /author to show my custom page, like page-author.php If i create this page I always get 404 if try use it. – Brotheryura Jan 7 '18 at 19:29
  • Ok thx I find problem in part of rewrite rules, some plugin break it. When I removed all plugins and check in default theme it work fine. Thx! – Brotheryura Jan 7 '18 at 22:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.