wpnikos
Forum Replies Created
-
Hi Champ Camba
Your question gave me the idea to have a look again and you saved the situation ??
The documentation says in step 4:
You can also create this folder in your theme or child theme:/theme-folder/ultimate-member/templates/profile/to override profile tab contents, the original profile templates are in:/plugin-folder/templates/profile/
This is wrong
After your comment by working on the snap-shot I noticed that in my child theme email templates were outside templates folder and I did not do that, this was done by the plugin while setting it up.
email was in: /child-theme-folder/ultimate-member/email/
I tried moving profile folder there as well
/child-theme-folder/ultimate-member/profile/
and Whoooooa !!!! it worked.
The profile-2.php and other templates e.g login.php still need to be inside child-theme-folder/ultimate-member/templates/Here is the screen shot of the new working structure
Thank you so much brother
All the best
Nikos
PS I don’t know how to add the snap shot O_O
Hi
This code in child-theme functions.php adds a new tab in profile and then content to that tab.
When it is about the user himself it opens on edit mode and the user meta field description appears in a form field ready for editingMaybe you need something like that
I hope if you have a look on that will help
Regards
NIkos
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Add a new Profile tab
* @param array $tabs
* @return array
*/
function um_mycustomtab_add_tab( $tabs ) {/**
* You could set the default privacy for custom tab.
* There are values for ‘default_privacy’ atribute:
* 0 – Anyone,
* 1 – Guests only,
* 2 – Members only,
* 3 – Only the owner
*/
$tabs[ ‘mycustomtab’ ] = array(
‘name’ => ‘About’,
‘icon’ => ‘um-faicon-user’,
‘default_privacy’ => 2,
);UM()->options()->options[ ‘profile_tab_’ . ‘mycustomtab’ ] = true;
return $tabs;
}
add_filter( ‘um_profile_tabs’, ‘um_mycustomtab_add_tab’, 1000 );/**
* Render tab content
* @param array $args
*/
function um_profile_content_mycustomtab_default( $args ) {$action = ‘mycustomtab’;
$fields_metakey = array(
‘description’
,’author_facebook’,
);$nonce = filter_input( INPUT_POST, ‘_wpnonce’ );
if( $nonce && wp_verify_nonce( $nonce, $action ) && um_is_myprofile() ) {
foreach( $fields_metakey as $metakey ) {
update_user_meta( um_profile_id(), $metakey, filter_input( INPUT_POST, $metakey ) );
}
UM()->user()->remove_cache( um_profile_id() );
}$fields = UM()->builtin()->get_specific_fields( implode( ‘,’, $fields_metakey ) );
?><div class=”um”>
<div class=”um-form”>
<form method=”post”><?php
if( um_is_myprofile() ) {
foreach( $fields as $key => $data ) {
echo UM()->fields()->edit_field( $key, $data );
}
}
else {
foreach( $fields as $key => $data ) {
echo UM()->fields()->view_field( $key, $data );
}
}
?><?php if( um_is_myprofile() ) : ?>
<div class=”um-col-alt”>
<div class=”um-left”>
<?php wp_nonce_field( $action ); ?>
<input type=”submit” value=”<?php esc_attr_e( ‘Update’, ‘ultimate-member’ ); ?>” class=”um-button” />
</div>
</div>
<?php endif; ?></form>
</div>
</div><?php
}
add_action( ‘um_profile_content_mycustomtab_default’, ‘um_profile_content_mycustomtab_default’ );- This reply was modified 4 years, 9 months ago by wpnikos.
I solved the problem by checking the dg6w8sjt8y_usermeta table to see if the user has administrator rights
I noticed that the prefix was the same but with some capital leters
It was DG6w8sjT8y_capabilities instead of dg6w8sjt8y_capabilities
I changed that and the problem was solved
Looks like WP for a reason probably within new installation WP does not update table entries but adds new ones
Or does not update tables but creates new Tables with different prefix
dg6w8sjt8y_capabilities was not updated but a new entry was created DG6w8sjT8y_capabilities
So the user was named admin but had no admin privilegessorry … excuse my English….
I mean no success after renaming/disabling them folders ??