Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I would like to remove fields from the profile in Theme My Login. I want to remove everything except email and password field. I am able to hide fields using a little jQuery. But un fortunately I'm not good with it. Can someone help me how to make this? step by step?

Update:
I found this but i dont know how to use it:

"This may not be the ideal approach, but I was able to hide fields (and their associated labels and the parent p/div/tr element) using a little jQuery, if you're familiar with that. Just target the input to hide, climb up to its parent element, and hide it. This assumes that the element is nested 3 levels down from the element i actually need to hide.. a in my case. And i use a wp conditional to run this code only on the 'edit-profile' page."

<?php
// this code goes in header.php, in the <head> section.
if(is_page('edit-profile') ) { ?>
    <script type="text/javascript">
        jQuery(document).ready(function() {
            // hide fields (the entire <tr>)
            jQuery('#id-of-field').parent().parent().parent().hide();
        });
    </script>
<?php }
share|improve this question
    
Are you talking about the plugin Theme My Login? If not, there are plenty of threads in this Stack about how to do this using a filter hook... –  brasofilo Jun 24 '12 at 13:06
    
i want to hide fields in profile page at frontend. like jabber yahoo im. actually i want to remove everything but the password and email field. –  1907 Jun 24 '12 at 13:13
    
If you are talking about the plugin, have you checked this page jfarthing.com/development/theme-my-login/templates ? –  brasofilo Jun 24 '12 at 13:24
    
yes i looked that page and read all support. i found this code but i dont know how to use it: <?php // this code goes in header.php, in the <head> section. if(is_page('edit-profile') ) { ?> <script type="text/javascript"> jQuery(document).ready(function() { // hide fields (the entire <tr>) jQuery('#id-of-field').parent().parent().parent().hide(); }); </script> <?php } –  1907 Jun 24 '12 at 13:27
    
1907, I know that learning a programming language and a foreign language is challenging and I congratulate you for your efforts! But I already mentioned to you that reading the FAQ will enhance your experience in this Stack and still you don't have the Analytical Badge... :( –  brasofilo Jun 25 '12 at 0:41

2 Answers 2

up vote 1 down vote accepted

From the link I provided in the comments:

All of the templates located within /wp-content/plugins/theme-my-login/templates are easily customizable. Just simply pick any template you wish to edit, copy it to your current theme’s directory and edit it as you wish. Theme My Login will always look for templates in your current theme’s directory first, before loading it’s own templates.

So:

  • create a Page Template using the file page.php of your theme as model and put a template header
<?php
/*
Template Name: Profile Page
*/
  • copy all the code from /wp-content/plugins/theme-my-login/templates/profile-form.php
  • paste it in your new template, substituting the loop block:
<?php while ( have_posts() ) : the_post(); ?>
  <?php /* code code code */ ?>
<?php endwhile; // end of the loop. ?>
  • now you can customize everything you need
share|improve this answer

@brasofilo is nearly there but there is a better way to do this.

Goto your theme folder and create a folder called 'theme-my-login'.

Copy any file from the theme-my-login/templates folder into this new folder.

The plugin will first check the theme's folder and then the template folder.

This is standard practice in WP for dealing with template files.

EG.

to edit the profile page copy /plugins/theme-my-plugin/templates/profile-form.php to /themes/child-theme/theme-my-login/profile-form.php

Et voila - you can now amend the template in your theme folder.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.