Brotheryura
Brotheryura

Reputation: 1188

Get 404 when try open author page

I am having a problem when I try open root of author I 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 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 )?

Upvotes: 0

Views: 546

Answers (1)

Rajendran Nadar
Rajendran Nadar

Reputation: 5438

1) Make template

Make a custom template and paste that PHP file into your themes directory with any name.

<?php
/* Template Name: Author page */

// add header

/*
 * You can pass params to the function to get more control
 * like, exclude the admin, show full name etc.
*/

wp_list_authors( $args );

// add footer here

2) Make a new page and use template

Let's say the name of the page is http://example.com/author/ add the newly created template on this page.

Style this page as per your need. Good luck (Y)

Don't have an idea how to use templates? Check this awesome tutorial [here]1.

Reference wp list authors

Upvotes: 1

Related Questions