I want the logout were it should be and were Woocommerce has it on the side nav. This is what I have so not to have to edit the core files.
<?php
add_action( 'um_after_account_page_load', 'my_after_account_page_load', 10 );
function my_after_account_page_load() {
// your code here
?>
<script>
jQuery( document ).ready(function() {
var url = "https://{yoursiteurl}/logout/";
jQuery(".um-account-side ul").append('<li><a href="'+url+'" class="um-account-link account-logout"><span class="um-account-icontip uimob800-show um-tip-w" original-title="Logout"><i class="um-faicon-sign-out"></i></span><span class="um-account-icon uimob800-hide"><i class="um-faicon-sign-out"></i></span><span class="um-account-title uimob800-hide">Logout</span><span class="um-account-arrow uimob800-hide"><i class="um-faicon-angle-right"></i></span></a></li>');
jQuery(".um-account-main").append('<div class="um-account-nav uimob340-show uimob500-show"><a href="'+url+'" class="account-logout">Logout<span class="ico"><i class="um-faicon-sign-out"></i></span></a></div>');
jQuery('.account-logout').on("click",function(e) {
e.stopPropagation();
window.location.replace(url);
});
});
</script>
<?php
}
I still do not have a way in adding fields to the account page to match the added form fields I have in the user registration form unless I program it in the core files.
-
This reply was modified 1 year, 2 months ago by
nathaniel45.