WordPress.org

Ready to get started?Download WordPress

Forums

Theme My Login
[resolved] Remove Personal Options in User Profile (12 posts)

  1. billgoldberg
    Member
    Posted 2 years ago #

    How can I remove the Personal Options in the user profile?

    Thank you.

  2. billgoldberg
    Member
    Posted 2 years ago #

    I could remove that part by editing profile-form.php in the theme-my-login template directory.

  3. jamessteer
    Member
    Posted 2 years ago #

    This worked for me, I got the idea from another forum but can't remember where.

    This code goes in your functions.php

    <?php

    function remove_opt_start($adddiv) {
    $gettitle = array('#<h3>Personal Options</h3>#');
    $adddiv = preg_replace($gettitle, '<div class="hidden">', $adddiv,1);
    return $adddiv;
    }

    function start_remove_opt_start() { ob_start("remove_opt_start"); }

    function end_remove_opt_start() { ob_end_flush(); }

    function remove_opt_end($addend) {
    $getname = array('#<h3>Name</h3>#');
    $addend = preg_replace($getname, '</div><h3>Name</h3>',$addend,1);
    return $addend;
    }

    function start_remove_opt_end() { ob_start("remove_opt_end"); }

    function end_remove_opt_end() { ob_end_flush(); }

    add_action('admin_head','start_remove_opt_start');
    add_action('admin_head','start_remove_opt_end');
    add_action('admin_footer','end_remove_opt_start');
    add_action('admin_footer','end_remove_opt_end');

    ?>

  4. Jeff Farthing
    Member
    Plugin Author

    Posted 2 years ago #

    If you mean TML's themed profile modules, just simply copy /theme-my-login/templates/profile-form.php to your current theme's directory and edit it as you wish.

  5. Bryan Hadaway
    Member
    Posted 2 years ago #

    Good work Jeff.

  6. jcx1028
    Member
    Posted 2 years ago #

    After trying this and trying to access my profile, I'm getting "Parse error: syntax error, unexpected T_ENDIF on line 2" of the profile-form.php now in my theme's directory. Is there something I need to edit, change or delete to get this to work?

  7. Jeff Farthing
    Member
    Plugin Author

    Posted 2 years ago #

    Apparently, you removed the if part of a PHP conditional statement but not the endif. If you don't understand, post your entire profile-form.php contents to Pastebin and link here.

  8. jcx1028
    Member
    Posted 2 years ago #

    Here's my edit-profile.php file: http://pastebin.com/mcDbxGK7.

    So far, I've tried removing everything from line 11 (<h3><?php _e( 'Personal Options', 'theme-my-login' ); ?></h3>) to line 41 (<?php endif; // function exists ?>). If this is incorrect, feel free to point me in the right direction.

    Any help is greatly appreciated.

  9. Jeff Farthing
    Member
    Plugin Author

    Posted 2 years ago #

    That code is almost unreadable, as it has no formatting. Please post well formatted code, as found in original templates.

  10. jcx1028
    Member
    Posted 2 years ago #

    Sorry. How's this?

    http://pastebin.com/Z9ypeGfM

  11. jcx1028
    Member
    Posted 2 years ago #

    You know, after looking at that non-compressed version of the file, I got it working. Just had to delete the following...

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Thanks for your help!

  12. nv1962
    Member
    Posted 2 years ago #

    Hip hip hurray for Theme My Login! Thanks Jeff.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic