WordPress.org

Ready to get started?Download WordPress

Forums

Changing Author Permalink / URL (1 post)

  1. amitsuman
    Member
    Posted 5 years ago #

    Hi All
    I just want to completely remove any base ie: blog.com/name instead of blog.com/author/name
    I have just to add to the rewrite.php edit:
    then only one extra change i have to made:
    leave the author_base blank
    and then find this code below:

    function get_author_permastruct() {
    if (isset($this->author_structure)) {
    return $this->author_structure;
    }

    if (empty($this->permalink_structure)) {
    $this->author_structure = '';
    return false;
    }

    $this->author_structure = $this->front . $this->author_base . '/%author%';

    return $this->author_structure;
    }

    and remove the forward slash from here:
    $this->author_base . '/%author%';

    so

    $this->author_base . '%author%';

    It's work but another link is not working
    blog.com/name/hello-world/

    So if any one have any idea about this then please Reply.
    Thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.