WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Changing author permalink to member (15 posts)

  1. Xenuan
    Member
    Posted 7 years ago #

    How can i change author permalink to member

    for example http://www.site.com/blog/author/admin to http://www.site.com/blog/member/admin

  2. Xenuan
    Member
    Posted 7 years ago #

    anyone can help?

  3. thedesigncoalition
    Member
    Posted 7 years ago #

    I am looking for the same thing. Any luck on this topic. I actually need to change mine to "artist" but same question. If it is somewhere in the core files just point me to it.

  4. anafikir
    Member
    Posted 7 years ago #

    I am looking for the same thing. Any change is it about

    wp-includes/classes.php

    Could you just point it?

  5. thedesigncoalition
    Member
    Posted 7 years ago #

    anafikir, was that another question or an answer?
    Thanks in advance

  6. anafikir
    Member
    Posted 7 years ago #

    It was the same question. I was just thinging out loud.

  7. thedesigncoalition
    Member
    Posted 7 years ago #

    Ha. OK, you had me looking through classes.php like crazy but I couldn't get anything working.

    Does anyone have the answer?

  8. thedesigncoalition
    Member
    Posted 7 years ago #

    Surely a moderator would know? No?

  9. thedesigncoalition
    Member
    Posted 7 years ago #

    I had another Idea. A mod-rewrite. I would think that

    RewriteRule ^artist/([A-Za-z]*)(/)?$ /author/$1

    would work, but to no avail. any reason why this wouldn't work?

    NOTE, i already have this in my .htaccess, could this be interfering? Because i get sent to my sites 404 page.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /ema/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /ema/index.php [L]
    </IfModule>
  10. thedesigncoalition
    Member
    Posted 7 years ago #

    better yet, I found the file. Line 156 of rewrite.php

    Changed:
    var $author_base = 'author';

    To:

    var $author_base = 'artist';

    NOTE: you have to update your permalink structure in "Options>Permalinks" for changes to take affect.

  11. Xenuan
    Member
    Posted 7 years ago #

    thedesigncoalition; it is working :) but only for member who has an entry. With ?author_name=X you can show every members profile. I want to do it with mod rewrite

  12. thedesigncoalition
    Member
    Posted 7 years ago #

    I tried and tried and am pretty sure I had the mod-rewrite right at one point with something like this before the wp stuff

    RewriteEngine On
    RewriteRule artist/([A-Za-z]*)(/)?$ /author/$1 [L]

    but it still just went to my 404.I think it has something to do with the wp rewrite. Sorry. My last post solution works for me but, If someone does come up with a solution, please post it.

  13. Xenuan
    Member
    Posted 7 years ago #

    RewriteEngine On
    RewriteRule ^member/([A-Za-z]*)(/)?$ ^index.php?author_name=$1 [L] is it working but it shows only the title

  14. thedesigncoalition
    Member
    Posted 7 years ago #

    Hmm. Not really sure my friend, to be honest with you, that is the first time I have ever even tried to do a mod-rewrite. Someone who is more familiar should be able to help.

  15. Xenuan
    Member
    Posted 6 years ago #

    I solved! First, open rewrite.php find var $author_base = 'author'; (line 156) then change author to anything for example member. After that, open classes.php find if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {

    it is under function handle_404 then replace it with

    if ( (0 == count($wp_query->posts)) && !is_404() && !is_author() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {

    all credits goes to: codersteve

Topic Closed

This topic has been closed to new replies.

About this Topic