WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using wp-usersonline plugin with user links, when you click for subscribers it goes to a not found page but works fine for authors, im thinking is there a way to redirect subscribers to a profile page and change the link into http://domain.com/member/profile=ID.

I found some scripts that will redirect to specific url but i dont know what to do next?

function new_author_base() {
    global $wp_rewrite;
    $author_slug = 'profile';
    $wp_rewrite->author_base = $author_slug;
add_action( 'init', 'new_author_base' );
share|improve this question

You can try to catch the 404 template and redirect it to the author template which will usee the same template for all users even if they are subscribers (or any other which have zero posts) something like this:

function no_404_for_all_users($template) {
    global $wp_query;
    if( !is_author() && get_query_var('author') && (0 == $wp_query->posts->post) ) {
        return get_author_template();
    return $template;

add_filter('404_template', 'no_404_for_all_users');
share|improve this answer
Still didnt work im testing it on a twentytwele template. But isnt there any changes just done on author.php it pulls author data so if its a subscriber then get_the_author_meta will not work? Sorry im kinda new to this stuff. – Jayson Pimentel Mar 12 '13 at 8:07
the twentytwele template shows the not found when the user has no posts but its still using the author.php template so you will need to edit that. – Bainternet Mar 12 '13 at 17:20
Do you have any samples? Please help or could you just give the query used in the author.php? – Jayson Pimentel Mar 13 '13 at 13:24
sample of what? the twentytwele author.php template has everything you need just look for the get_template_part('content','none'); which is what happens when a user has no posts. – Bainternet Mar 13 '13 at 13:27
How about when the user dont have posts just display the profile of them? Especially subscribers only. – Jayson Pimentel Mar 13 '13 at 13:29

Sorry atlast im free i have been looking to a user that has a space on the user name thats why im being redirected to 404, i removed get_template_part('content','none'); and replaced whith some author details and wallah! Its there. Thanks for the help. I will still figure out how to display with spaces we have just migrated this to wordpress. Thanks!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.