Title: richdal's Replies | WordPress.org

---

# richdal

  [  ](https://wordpress.org/support/users/richdal/)

 *   [Profile](https://wordpress.org/support/users/richdal/)
 *   [Topics Started](https://wordpress.org/support/users/richdal/topics/)
 *   [Replies Created](https://wordpress.org/support/users/richdal/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/richdal/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/richdal/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/richdal/engagements/)
 *   [Favorites](https://wordpress.org/support/users/richdal/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Buddypress Xprofile Custom Fields Type] Modify Birthdate in the edit form](https://wordpress.org/support/topic/modify-birthdate-in-the-edit-form/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/modify-birthdate-in-the-edit-form/#post-7221270)
 * A CSS and jQuery approach looks a lot simpler. I’ll give that a try. Thanks for
   the help.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Buddypress Xprofile Custom Fields Type] Modify Birthdate in the edit form](https://wordpress.org/support/topic/modify-birthdate-in-the-edit-form/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/modify-birthdate-in-the-edit-form/#post-7221198)
 * Before I installed this plugin I was able to make some basic changes to BuddyPress
   profile edit form and was trying to apply the same logic here. I had to make 
   a custom class file by copying the original from core and adjusting a few names.
   I can get the BuddyPress datebox changes linked up, but can’t get the birthdate
   one in this plugin.
 * For the datebox I copied the original to my child theme and renamed the files
   and class names…
 * Datebox change
    Original: /wp-content/plugins/buddypress/bp-xprofile/classes/
   class-bp-xprofile-field-type-datebox.php
 *     ```
       class BP_XProfile_Field_Type_Datebox extends BP_XProfile_Field_Type {
       ```
   
 * Custom: /wp-content/themes/genbu-child/custom_class-bp-xprofile-field-type-profile-
   datebox.inc
 *     ```
       class Custom_BP_XProfile_Field_Type_Profile_Datebox extends BP_XProfile_Field_Type {
       ```
   
 * Birthdate change
    Original: /wp-content/plugins/buddypress-xprofile-custom-fields-
   type/classes/Bxcft_Field_Type_Birthdate.php
 *     ```
       if (!class_exists('Bxcft_Field_Type_Birthdate'))
       {
           class Bxcft_Field_Type_Birthdate extends BP_XProfile_Field_Type
       ```
   
 * Custom: /wp-content/themes/genbu-child/custom_bxcft_field_type_birthdate.inc
 *     ```
       if (!class_exists('Custom_Bxcft_Field_Type_Birthdate'))
       {
           class Custom_Bxcft_Field_Type_Birthdate extends BP_XProfile_Field_Type
       ```
   
 * In the theme’s functions.php file I added..
 *     ```
       include 'custom_class-bp-xprofile-field-type-profile-datebox.inc';
       include 'custom_bxcft_field_type_birthdate.inc';
       function custom_bp_xprofile_create_uprofile_field_type( $type ) {
   
               $field = custom_bp_xprofile_get_uprofile_field_types();
               $class = isset( $field[$type] ) ? $field[$type] : '';
   
               /**
                * To handle (missing) field types, fallback to a placeholder field object if a type is unknown.
                */
               if ( $class && class_exists( $class ) ) {
                       return new $class;
               } else {
                       return new BP_XProfile_Field_Type_Placeholder;
               }
       }
       function custom_bp_xprofile_get_uprofile_field_types() {
               $fields = array(
               'checkbox'       => 'BP_XProfile_Field_Type_Checkbox',
               'datebox'        => 'Custom_BP_XProfile_Field_Type_Profile_Datebox',
               'birthdate'      => 'Custom_Bxcft_Field_Type_Birthdate',
               'multiselectbox' => 'BP_XProfile_Field_Type_Multiselectbox',
               'number'         => 'BP_XProfile_Field_Type_Number',
               'url'            => 'BP_XProfile_Field_Type_URL',
               'radio'          => 'BP_XProfile_Field_Type_Radiobutton',
               'selectbox'      => 'BP_XProfile_Field_Type_Selectbox',
               'textarea'       => 'BP_XProfile_Field_Type_Textarea',
               'textbox'        => 'BP_XProfile_Field_Type_Profile_Textbox',
               );
               return apply_filters( 'bp_xprofile_get_field_types', $fields );
       }
       ```
   
 * I then setup the edit.php file in my child theme folder and changed the bp_xprofile_create_field_type()
   function to custom_bp_xprofile_create_uprofile_field_type()
 * /wp-content/themes/genbu-child/buddypress/members/single/profile/edit.php
 *     ```
       <?php
       //$field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
       $field_type = custom_bp_xprofile_create_uprofile_field_type( bp_get_the_profile_field_type() );
                                       $field_type->edit_field_html();
       ```
   
 * When I load the profile edit screen the datebox changes came up fine but not 
   the birthdate. When I checked the information in the custom_bp_xprofile_create_uprofile_field_type()
   function the [datebox] was set to “Custom_BP_XProfile_Field_Type_Profile_Datebox”
   but [birthdate] was still pointing to “Bxcft_Field_Type_Birthdate” even though
   I it was set to “Custom_Bxcft_Field_Type_Birthdate” in the custom_bp_xprofile_get_uprofile_field_types()
   function.
 *     ```
       Array
       (
           [checkbox] => BP_XProfile_Field_Type_Checkbox
           [datebox] => Custom_BP_XProfile_Field_Type_Profile_Datebox
           [birthdate] => Bxcft_Field_Type_Birthdate
           [multiselectbox] => BP_XProfile_Field_Type_Multiselectbox
           [number] => BP_XProfile_Field_Type_Number
           [url] => BP_XProfile_Field_Type_URL
           [radio] => BP_XProfile_Field_Type_Radiobutton
           [selectbox] => BP_XProfile_Field_Type_Selectbox
           [textarea] => BP_XProfile_Field_Type_Textarea
           [textbox] => BP_XProfile_Field_Type_Profile_Textbox
           [email] => Bxcft_Field_Type_Email
           [web] => Bxcft_Field_Type_Web
           [datepicker] => Bxcft_Field_Type_Datepicker
           [select_custom_post_type] => Bxcft_Field_Type_SelectCustomPostType
           [multiselect_custom_post_type] => Bxcft_Field_Type_MultiSelectCustomPostType
           [select_custom_taxonomy] => Bxcft_Field_Type_SelectCustomTaxonomy
           [multiselect_custom_taxonomy] => Bxcft_Field_Type_MultiSelectCustomTaxonomy
           [checkbox_acceptance] => Bxcft_Field_Type_CheckboxAcceptance
           [image] => Bxcft_Field_Type_Image
           [file] => Bxcft_Field_Type_File
           [color] => Bxcft_Field_Type_Color
           [decimal_number] => Bxcft_Field_Type_DecimalNumber
           [number_minmax] => Bxcft_Field_Type_NumberMinMax
           [slider] => Bxcft_Field_Type_Slider
       )
       ```
   
 * I was able to find this filter but don’t know how to modify it…
 * /wp-content/plugins/buddypress-xprofile-custom-fields-type/bp-xprofile-custom-
   fields-type.php
 *     ```
       add_filter( 'bp_xprofile_get_field_types', array($this, 'bxcft_get_field_types'), 10, 1 );
              public function bxcft_get_field_types($fields)
               {
                   $new_fields = array(
                       'birthdate'                     => 'Bxcft_Field_Type_Birthdate',
                       'email'                         => 'Bxcft_Field_Type_Email',
                       'web'                           => 'Bxcft_Field_Type_Web',
                       'datepicker'                    => 'Bxcft_Field_Type_Datepicker',
                       'select_custom_post_type'       => 'Bxcft_Field_Type_SelectCustomPostType',
                       'multiselect_custom_post_type'  => 'Bxcft_Field_Type_MultiSelectCustomPostType',
                       'select_custom_taxonomy'        => 'Bxcft_Field_Type_SelectCustomTaxonomy',
                       'multiselect_custom_taxonomy'   => 'Bxcft_Field_Type_MultiSelectCustomTaxonomy',
                       'checkbox_acceptance'           => 'Bxcft_Field_Type_CheckboxAcceptance',
                       'image'                         => 'Bxcft_Field_Type_Image',
                       'file'                          => 'Bxcft_Field_Type_File',
                       'color'                         => 'Bxcft_Field_Type_Color',
                       'decimal_number'                => 'Bxcft_Field_Type_DecimalNumber',
                       'number_minmax'                 => 'Bxcft_Field_Type_NumberMinMax',
                       'slider'                        => 'Bxcft_Field_Type_Slider',
                   );
                   $fields = array_merge($fields, $new_fields);
   
                   return $fields;
               }
       ```
   
 * Already tried adding this to functions.php but broke all of the fields so none
   of them displayed
 *     ```
       add_filter( 'bp_xprofile_get_field_types', array($fields, 'custom_bxcft_get_field_types'), 10, 1 );
       function custom_bxcft_get_field_types($fields)
       {
                  $new_fields = array(
                       'birthdate'                     => 'Custom_Bxcft_Field_Type_Birthdate',
                       'email'                         => 'Bxcft_Field_Type_Email',
                       'web'                           => 'Bxcft_Field_Type_Web',
                       'datepicker'                    => 'Bxcft_Field_Type_Datepicker',
                       'select_custom_post_type'       => 'Bxcft_Field_Type_SelectCustomPostType',
                       'multiselect_custom_post_type'  => 'Bxcft_Field_Type_MultiSelectCustomPostType',
                       'select_custom_taxonomy'        => 'Bxcft_Field_Type_SelectCustomTaxonomy',
                       'multiselect_custom_taxonomy'   => 'Bxcft_Field_Type_MultiSelectCustomTaxonomy',
                       'checkbox_acceptance'           => 'Bxcft_Field_Type_CheckboxAcceptance',
                       'image'                         => 'Bxcft_Field_Type_Image',
                       'file'                          => 'Bxcft_Field_Type_File',
                       'color'                         => 'Bxcft_Field_Type_Color',
                       'decimal_number'                => 'Bxcft_Field_Type_DecimalNumber',
                       'number_minmax'                 => 'Bxcft_Field_Type_NumberMinMax',
                       'slider'                        => 'Bxcft_Field_Type_Slider',
                   );
                   $fields = array_merge($fields, $new_fields);
   
                   return $fields;
       }
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Changing header image in functions.php](https://wordpress.org/support/topic/changing-header-image-in-functionsphp/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/changing-header-image-in-functionsphp/#post-7187201)
 * With a little trial and error I found the change was easiest to make with jQuery.
   Installed the [Head & Footer Code](https://wordpress.org/plugins/head-footer-code/)
   plugin to I could load my jQuery code at the end of the document and was pretty
   straight forward.
 * I used code similar to this and was able to add different conditions to change
   up which image I wanted to use.
 *     ```
       <script type="text/javascript">
       jQuery( document ).ready( function() {
         var loc = "http:/....../logoforheader.jpg";
         jQuery( ".header-image").attr("src",loc);
       });
       </script>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Changing header image in functions.php](https://wordpress.org/support/topic/changing-header-image-in-functionsphp/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/changing-header-image-in-functionsphp/#post-7187188)
 * I haven’t been able to find a way to modify the header-image with CSS consistently
   across web browsers.
 * I was trying to add a condition in my theme’s functions.php file to change up
   the header-image in a few places. Not familiar with using the WordPress filters
   but is there a way to use them to change up what I get back from get_header_image()?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Setting Page's Featured Image](https://wordpress.org/support/topic/setting-pages-featured-image/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/setting-pages-featured-image/#post-7187009)
 * Never mind I think I’m getting the Featured Image mixed up with the site logo.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Members Membership Plugin] Changing the registration confirmation text](https://wordpress.org/support/topic/changing-the-registration-confirmation-text/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/changing-the-registration-confirmation-text/#post-7164225)
 * Thanks for the pointer to the Dialogs tab, completely overlooked it.
 * Was seeing some references to using add_filter for changing up the text but didn’t
   realize you had controls for some of that in the Plugins settings. Been making
   changes in my child theme so I haven’t made any changes with the core programs.
   Thanks for the help
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Members Membership Plugin] Possible to do validate registrations by email?](https://wordpress.org/support/topic/possible-to-do-validate-registrations-by-email/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/possible-to-do-validate-registrations-by-email/#post-7151553)
 * Thanks, I may have gotten ahead of myself. I’ll check out the default configuration
   and see if we want to go that route instead of having the password fields on 
   the registration form.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Registration on home page](https://wordpress.org/support/topic/registration-on-home-page/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/registration-on-home-page/#post-7150887)
 * Thanks for the info. I was able to adjust the registration form so it only had
   the four fields I needed and got it working with the shortcode on the homepage.
   Just need to check through the other program settings and adjust the appearance.
   Appreciate the help.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Profile Builder - Beautiful User Registration Forms, User Profiles & User Role Editor] Getting 404 error on registration form submit](https://wordpress.org/support/topic/getting-404-error-on-registration-form-submit/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/getting-404-error-on-registration-form-submit/#post-7148212)
 * I tried adding the [wppb-login] shortcode to the same Page and was able to login
   successfully. Just can’t get the registration part to work
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Profile Builder - Beautiful User Registration Forms, User Profiles & User Role Editor] Getting 404 error on registration form submit](https://wordpress.org/support/topic/getting-404-error-on-registration-form-submit/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/getting-404-error-on-registration-form-submit/#post-7148208)
 * Thanks for the reply. I need a login to get to the site so I wouldn’t have a 
   link I could share.
 * **Profile Builder => General Settings**
    Load Profile Builder’s own CSS file 
   in the front-end: no “Email Confirmation” Activated: yes “Email Confirmation”
   Landing Page: Activate Allow Users to Log in With: Username and Email Minimum
   Password Length: [empty] Minimum Password Strength: Disabled
 * **Profile Builder => Admin Bar Settings**
    All Default
 * **Pages => Home**
    [wppb-register]
 * If I submit an empty form I get a “404 Not Found” error. Same when the form is
   complete or use a duplicate username. When I checked the HTML output for that
   I was seeing this
 *     ```
       <form enctype="multipart/form-data" method="post" id="wppb-register-user" class="wppb-user-forms wppb-register-user" action="">
       			<ul><li class="wppb-form-field wppb-default-username" id="wppb-form-element-2">
       			<label for="username">Username<span class="wppb-required" title="This field is required">*</span></label>
       			<input class="text-input default_field_username" name="username" maxlength="70" id="username" value="" type="text"></li><li class="wppb-form-field wppb-default-e-mail" id="wppb-form-element-8">
       			<label for="email">Email Address<span class="wppb-required" title="This field is required">*</span></label>
       			<input class="text-input default_field_email" name="email" maxlength="70" id="email" value="" type="email"></li><li class="wppb-form-field wppb-default-password" id="wppb-form-element-12">
       			<label for="passw1">Choose a Password<span class="wppb-required" title="This field is required">*</span></label>
       			<input class="text-input" name="passw1" maxlength="70" id="passw1" value="" autocomplete="off" type="password"><span class="wppb-description-delimiter">Minimum length of 8 characters</span></li><li class="wppb-form-field wppb-default-repeat-password" id="wppb-form-element-13">
       			<label for="passw2">Confirm Password<span class="wppb-required" title="This field is required">*</span></label>
       			<input class="text-input" name="passw2" maxlength="70" id="passw2" value="" autocomplete="off" type="password"></li></ul><ul></ul>			<p class="form-submit">
       								<input name="register" id="register" class="submit button" value="Register" type="submit">
       				<input name="action" id="action" value="register" type="hidden">
       				<input name="form_name" id="form_name" value="unspecified" type="hidden">
       							</p><!-- .form-submit -->
       			<input id="register_nonce_field" name="register_nonce_field" value="2ad66287e2" type="hidden"><input name="_wp_http_referer" value="/rgsite/" type="hidden">
       </form>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [is_home() and is_front_page() not working](https://wordpress.org/support/topic/is_home-and-is_front_page-not-working-1/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/is_home-and-is_front_page-not-working-1/#post-7121559)
 * Nevermind, figured it out. Missed the Layout options in the Pages configuration
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Setting toggle always on for Search](https://wordpress.org/support/topic/setting-toggle-awlays-on-for-search/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/setting-toggle-awlays-on-for-search/#post-7082032)
 * Was able to figure out a way to keep the search field expanded so the icon didn’t
   have to clicked to open it. Looked like there was jQuery code being used to manage
   the effect, so I added this to my theme’s functions.php file
 *     ```
       function ToggleSearchOn() { ?>
       <script type="text/javascript">
       jQuery( document ).ready( function($) {
               $( ".search-toggle" ).parents( ".menu-search" ).toggleClass( "search-toggle-active" );
       </script>
       <?php
       }
       add_action( 'wp_footer', 'ToggleSearchOn' );
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Setting toggle always on for Search](https://wordpress.org/support/topic/setting-toggle-awlays-on-for-search/)
 *  Thread Starter [richdal](https://wordpress.org/support/users/richdal/)
 * (@richdal)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/setting-toggle-awlays-on-for-search/#post-7081970)
 * For the toggle I meant having to click the magnifying glass icon to show or hide
   the search field and its submit button. Trying to remove the effect to it’s always
   displaying. That way it reduces the steps for the user and easier to locate.
 * I need to login to the site to access so I wouldn’t have a public access page
   to share. I highlighted the changes I made from the functions.php file and the
   CSS file it loads, but can include other parts of the code if needed.

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