How to change author link to lowercase
-
Hi,
Firstly, thank you for that nice plugin, it is very useful and easy customizable.
I have a rather small proble : the link which goes to author archive page gives 404 error, because of uppercase letter, for example, if the authors username – “myname”, there is no problem, but if it contain uppercase letters – “Myname”, the link is broken. Please, suggest how can i change this. May be this problem is the result of my mistakes, but anyway i hope for your help.
Website is in russian, but i think you will find your widget: https://srednieveka.net/
I suppose the problem is somewhere here:
<?php
if($authorlink==”No”)
{
$temp=explode(” “,$user->display_name);
echo ‘
<div style=”width:’.$width.’px;text-align:center;align:center”>’.$temp[0];
echo ‘
‘.$temp[1].’ ‘.$temp[2];echo “</div>”;
}
else
{
$temp=explode(” “,$user->display_name);$link = sprintf(
‘
<div style=”width:’.$width.’;text-align:center;align:center”>%3$s
%4$s %5$s</div>’,
get_author_posts_url( $user->ID, $user->user_login ),
esc_attr( sprintf( __( ‘Posts by %s (%s)’ ), $user->display_name,get_usernumposts($user->ID) ) ),
$temp[0],$temp[1],$temp[2]
)
;
echo $link;}
Best regards,
Flandre
- The topic ‘How to change author link to lowercase’ is closed to new replies.