Skip to:
Content
Pages
Categories
Search
Top
Bottom

Dynamic Page Creation


  • Scotm
    Participant

    @scotm

    In this thread a solution from @chouf1 provides a neat way to create a page for each user titled by username.

    As I see it, however, the solution might fall down if a user edits their username in the profile settings. Also, as I understand it, the admin would need to create the page with the username after the user has registered.

    There are some old discussions around WordPress.org on how to create a page automatically upon registration, but no solution that I can find. Does anyone know how this mod from @chouf1 might be enhanced to enable dynamic page creation tied to the BP username?

    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)

  • @mercime
    Participant

    @mercime

    @scotm default WP/BP installations do not allow members to change usernames. So unless you’ve installed a plugin which allows such functionality for members …


    Scotm
    Participant

    @scotm

    Well the primary info field in BP is username and it can be edited in the profile area, correct? Or does that field actually only edit the user’s display name? Regardless, if you change it the code no longer works since it’s looking for whatever page name you chose to create in the first place.


    danbpfr
    Participant

    @chouf1

    @scotm,

    don’t procrastinate before testing please ! The function use
    `bp_get_displayed_user_fullname`
    So even if you change John to Jim, it stays always to displayed_user_fullname

    The mandatory “Name” field on profile contains the displayed user name and can be changed from the user profile admin. (ak displayed_user_FULLNAME !) which is not first name and last name asked by WP on the registering form… 😉

     

     

     


    Scotm
    Participant

    @scotm

    I’ve tested it using your code and if I change the primary username field while logged in to BuddyPress, the link no longer works because it’s looking for the title you chose first (username). Actually, this is of no concern to me anymore since I’ve chosen in my BP install to hide the primary username field from members so that they can’t change it after becoming a member.

    One question I do have is whether the code as written is intended to provide a permalink and page title that reads “John Smith’s Page”? My use of it only provides the username in the title, so it reads “John Smith”.

    Thx

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Dynamic Page Creation’ is closed to new replies.
Skip to toolbar