简体   繁体   中英

Customizing wordpress navigation header with woocommerce my account

I am new to wordpress and I was creating a eCommerce website with woocommerce, then I have an idea to make an custom navigation header where when user is not log in it will show login/register and when login it will show to name of the customer.

用户未登录

在此处输入图片说明

There are a few ways you can achieve this.

The easiest option is to use any one of the below plugins. Using these plugins, you can show/hide menu items based on their login status. These plugins also allow you to customize the menu based on User roles as well.

https://wordpress.org/plugins/nav-menu-roles/

https://wordpress.org/plugins/user-menus/

Or you can assign a custom class to the menu item and then you can hide/show them using CSS. "logged-in" class is added to the BODY tag when a user is logged in.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM