Ready to get started?Download WordPress


Theme My Login
[resolved] Custom profile template not saved (4 posts)

  1. supersuphot
    Posted 1 year ago #

    I use latest WP with theme my login plugin.
    I want to make a custom profile template. so I create a page "Update Profile" www.mysite.com/update-profile/

    Then I add shortcode to a page
    [theme-my-login default_action="profile"]

    The profile form show up, but when make change and hit update.
    form submitted but nothing saved.

    I won't use plugin's profile page because I need to customize the header and footer different from index.php template. (all pages in plugin use index.php template right?)

    Any suggestion?
    ThankS :)


  2. Jeff Farthing
    Plugin Author

    Posted 1 year ago #

    This will not work properly until 6.3 is released and all actions actually have a separate "page". Until then, you can load a specific template using a filter:

    function tml_template_include( $template ) {
    	if ( is_page( 'update-profile' ) ) {
    		if ( $profile_template = locate_template( 'update-profile.php' ) )
    			return $profile_template;
    	return $template;
    add_action( 'template_include', 'tml_template_include' );
  3. supersuphot
    Posted 1 year ago #

    I got

    reset() [function.reset]: Passed variable is not an array or object in .../update-profile.php on line 7

    which is

    $user_role = reset( $profileuser->roles );

    look like variable not loaded? If i remove that line, just got a blank page.

  4. Jeff Farthing
    Plugin Author

    Posted 1 year ago #

    Make sure you have the opening lines from the original profille-form.php... I believe the $profileuser variable is set there.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic