WordPress.org

Ready to get started?Download WordPress

Forums

Permalink in wordpress (4 posts)

  1. ChetanTiwari
    Member
    Posted 1 year ago #

    Hi All,

    How can I rewrite a permalink in wordpress
    I want to use user login name in wordpress url.

    domain-name/page-name/uname/user_login i.e

    domain-name/page-name/variable-name/value-of variable

    or

    domain-name/page-name/user_login i.e

    domain-name/page-name/any-value

    In place of

    domain-name/page-name/?variable-name=value-of-variable

    Can anyone help me out?

    Thanks in advance

  2. YouON
    Member
    Posted 1 year ago #

    User login? Don't you need BuddyPress for this?

  3. bcworkz
    Member
    Posted 1 year ago #

    In general, to alter the way WP interprets requested permalinks, use the Rewrite API.

    To alter how permalinks are displayed on a page you can alter the page template or filter the_permalink() function using 'post_link'

  4. ChetanTiwari
    Member
    Posted 1 year ago #

    Thanks for the quick reply but I have to do it in WordPress not in Buddypress

    I have also created a plugin for that which is mentioned in this link

    http://stackoverflow.com/questions/2210826/need-help-with-wp-rewrite-in-a-wordpress-plugin

    but it doesn't work for me it simply show the value of the variable passed in the permalink and I've to use it as a variable for further use in a template

Topic Closed

This topic has been closed to new replies.

About this Topic