Title: Problem with front
Last modified: August 24, 2016

---

# Problem with front

 *  Resolved [Ramboz89](https://wordpress.org/support/users/ramboz89/)
 * (@ramboz89)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-with-front/)
 * Hi there,
 * Your plugin is really nice thanks for that, I only have a problem now that i 
   set a custom permalink for blog posts.
 * It applies for author as well,googling about that problem it looks like i need
   to disable the property “with_front”. Can you help with this issue?
 * Example
 * my blog posts have got this link structure
    domain.com/news-from-london/blogpost-
   slug author domain.com/news-from-london/slug-choosen-by-role/author-slug i just
   need domain.com/slug-choosen-by-role/author-slug
 * cheers
 * [https://wordpress.org/plugins/edit-author-slug/](https://wordpress.org/plugins/edit-author-slug/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Brandon Allen](https://wordpress.org/support/users/thebrandonallen/)
 * (@thebrandonallen)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-with-front/#post-5996371)
 * I guess that depends on how “news-from-london” appeared in the first place. Did
   you change the “Site Address” option, or did this happen some other way.
 *  Thread Starter [Ramboz89](https://wordpress.org/support/users/ramboz89/)
 * (@ramboz89)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-with-front/#post-5996377)
 * Hi Brandon,
 * thanks for your time,
 * i’ve just set up my with that custom structure.
 * other custom type wasn’t affected by this change.
 * your plugin is set up as setting author base according to their role. could it
   help?
 *  Plugin Author [Brandon Allen](https://wordpress.org/support/users/thebrandonallen/)
 * (@thebrandonallen)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-with-front/#post-5996392)
 * You could try something like this in your theme’s functions.php file
 *     ```
       function my_author_link( $link = '' ) {
       	return str_replace( 'news-from-london/', '', $link );
       }
       add_filter( 'author_link', 'my_author_link' );
       ```
   
 *  Thread Starter [Ramboz89](https://wordpress.org/support/users/ramboz89/)
 * (@ramboz89)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-with-front/#post-5996394)
 * Hello,
 * thanks Brandon i already found how to replace that part of the link,
    but without
   that it gives me a 404 error
 * cheers
 *  Plugin Author [Brandon Allen](https://wordpress.org/support/users/thebrandonallen/)
 * (@thebrandonallen)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-with-front/#post-5996401)
 * Try changing the above code to
 *     ```
       function my_author_link() {
       	global $wp_rewrite;
       	$wp_rewrite->author_structure = str_replace( 'news-from-london/', '', $wp_rewrite->author_structure );
       }
       add_action( 'init ', 'my_author_link' );
       ```
   
 * Then go to Settings > Permalinks and click save.
 * The previous code worked for me, but I still don’t really know how you set up
   your permalink settings. I’m not a my computer to test the new code, so I can’t
   give any assurances that it will work.
 * To answer your earlier question, no, setting the author base to be role-based
   won’t have an effect. Let me know if this works, if not, I’ll try to find a solution
   when I get a chance.
 *  Plugin Author [Brandon Allen](https://wordpress.org/support/users/thebrandonallen/)
 * (@thebrandonallen)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problem-with-front/#post-5996471)
 * Had some time to sit down and work this out.
 * This should work
 *     ```
       function my_author_link() {
       	global $wp_rewrite;
       	$wp_rewrite->author_structure = $wp_rewrite->author_base . '/%author%';
       }
       add_action( 'init', 'my_author_link' );
       ```
   
 * Same as above applies. You need to go to Settings > Permalinks and click save.
   Then all should be well. Using this approach, it’s not longer necessary to filter‘
   author_link’ as I first showed, and you stated you already tried.
 *  Thread Starter [Ramboz89](https://wordpress.org/support/users/ramboz89/)
 * (@ramboz89)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problem-with-front/#post-5996530)
 * Perfect, it worked like a charm. Thanks for your time
 *  Plugin Author [Brandon Allen](https://wordpress.org/support/users/thebrandonallen/)
 * (@thebrandonallen)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problem-with-front/#post-5996533)
 * Glad you got it fixed!
 *  Plugin Author [Brandon Allen](https://wordpress.org/support/users/thebrandonallen/)
 * (@thebrandonallen)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/problem-with-front/#post-5996570)
 * I’ve just release version 1.2.0 which adds this functionality. If you are still
   using any of the code above, please remove it before using the built-on version.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Problem with front’ is closed to new replies.

 * ![](https://ps.w.org/edit-author-slug/assets/icon.svg?rev=1582213)
 * [Edit Author Slug](https://wordpress.org/plugins/edit-author-slug/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/edit-author-slug/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/edit-author-slug/)
 * [Active Topics](https://wordpress.org/support/plugin/edit-author-slug/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/edit-author-slug/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/edit-author-slug/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Brandon Allen](https://wordpress.org/support/users/thebrandonallen/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/problem-with-front/#post-5996570)
 * Status: resolved