Support » Plugin: CubePoints » Top Users Widget – Authors links broken when author username has whitespace

  • I am using the Cubepoints TOP USERS widget and need the usernames to link to their Author Pages. Using the code below generates a link with the username in it – but If the user has chosen a username with a space in it (eg: Joe Bloggs) the %user% shortcode for the widget generates a username with whitespace, which is no use for using in a link.

    For example in the widget I use the following :

    <a href="http:/www.abcde.com/author/%user%/">%user% (%points%)</a>

    Generates a link like this:

    http:/www.abcde.com/author/joe bloggs/

    Which when clicked links to a 404page that doesnt exist:

    http:/www.abcde.com/author/joe%20bloggs/

    is it possible to correct the %user% shortcode? or even provide a new shortcode that shows get_the_author_link?

    I think this post covers the issue but i cant work out how to apply the method to the Cubepoints plugin. http://wordpress.org/support/topic/problem-with-the_author_metauser_login-an-usernames-with-whitespace

    http://wordpress.org/extend/plugins/cubepoints/

  • The topic ‘Top Users Widget – Authors links broken when author username has whitespace’ is closed to new replies.