• Resolved renfredyu

    (@renfredyu)


    Hi all, please help

    my site theme is coming with a $wp_rewrite from /author/to /user/ as below:

    //Rewrite slug from /author/ to /user/
    global $wp_rewrite;
    $wp_rewrite->author_base = “user”;
    $wp_rewrite->author_structure = “/” . $wp_rewrite->author_base . “/%author%/”;

    i am trying to change “user” to nothing at all.
    after save the file and press “save” the permalink in control panel, the author slug disappeared (from abc.com/user/username to abc.com/username)but cannot access to any pages, all redirected to homepage (or 404 error).

    why this is happening? change the author slug will affect the page permalink structure?

    I need to have author disappeared, please help!!

    Renfred

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    The author_base can’t be empty.

    Let’s say you have post called Hello World, and a author named admin. If you set the author base empty it correctly gets the author archive at example.com/admin. Now if you want to visit the Hello word post at example.com/hello-world WordPress is searching for an author called hello world. As there is no such author it goes to a 404 page.

    Thread Starter renfredyu

    (@renfredyu)

    Hi Keesiemeijer,

    Thank you for your explanation!

    one funny thing i observed is, if the slug is change to a “.”, i.e.$wp_rewrite->author_base = “.”; then most of the pages link work fine but now you cannot access to the author pages.

    the author pages are showing mydomain.com/authorname like when you leave the slug empty.

    any idea?

    Thanks!

    Renfred

    Thread Starter renfredyu

    (@renfredyu)

    Also, in the other hand, if a slug can be added like domain.com/slug/pages, then it would be possible to remove the author slug completely?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘change author slug affecting page permalink’ is closed to new replies.