WordPress.org

Ready to get started?Download WordPress

Forums

CubePoints
Top Users Widget - Authors links broken when author username has whitespace (1 post)

  1. ahcreative
    Member
    Posted 1 year ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic