Comments 3Sapan started the conversationMarch 11, 2019 at 5:44pmHello- How and where can i edit/add the widgets that comes in the drop down list in the Theme Options (please see attached screenshot).I do not need the date along with the customer login instead need a wishlist link on top bar, how to do that Thanks[deleted] repliedMarch 12, 2019 at 9:26amHi Sapan,If want custom text or widget simply add your own text like shown below: (view large image)The result will be: (view large image)I hope this will help you. 3Sapan repliedMarch 12, 2019 at 10:46pmHello Arlind- thanks for the help. I want to show Customer Login/My Account and Cart Total on the top right. Contact Us and Wishlist on the top left. Can you please provide the codes?Also, how can i edit an existing widget in the dropdown list.ThanksSapan[deleted] repliedMarch 14, 2019 at 8:27amHi Sapan,To show these custom widgets I have coded for you custom shortcodes to show in header > top menu, so please add this code in functions.php: function shortcode_customer_login_and_cart_total_text() { $myaccount_link = wc_get_page_permalink( 'myaccount' ); if ( 0 == $current_user->ID ) { $no_registration = is_user_logged_in() || 'no' === get_option( 'woocommerce_enable_checkout_login_reminder' ); if ( $no_registration ) { $widget = sprintf( __( '<a href="%1$s" class="top-menu--link">Customer Login</a>', 'aurum' ), $myaccount_link ); } else { $widget = sprintf( '<a href="%1$s" class="top-menu--link">%2$s</a> %3$s <a href="%1$s" class="top-menu--link">%4$s</a>', $myaccount_link, __( 'Login', 'aurum' ), __( 'or', 'aurum' ), __( 'Register', 'aurum' ) ); } } else { $widget = sprintf( '<a href="%1$s" class="top-menu--link">%2$s</a>', $myaccount_link, __( 'My Account Details', 'aurum' ) ); } // Separator $widget .= '<span class="top-menu--separator">|</span>'; // Date $widget .= sprintf( '<a href="%1$s" class="top-menu--cart-totals">%2$s <span class="top-menu--number">%3$s</span></a>', wc_get_cart_url(), __( 'Cart totals:', 'aurum' ), WC()->cart->get_cart_total() ); return $widget; } function shortcode_contact_us_and_wishlist() { $widget = sprintf( '<a href="%1$s" class="top-menu--link">%2$s</a>', home_url( '/contact' ), 'Contact Us' ); $widget .= '<span class="top-menu--separator">|</span>'; $widget .= sprintf( '<a href="%1$s" class="top-menu--link">%2$s</a>', home_url( '/wishlist' ), 'Wishlist' ); return $widget; } add_shortcode( 'customer_login_and_cart_total_text', 'shortcode_customer_login_and_cart_total_text' ); add_shortcode( 'contact_us_and_wishlist', 'shortcode_contact_us_and_wishlist' ); Then in Theme Options set these shortcodes: (view large image)The result: (view large image) 3Sapan repliedMarch 15, 2019 at 11:12pmHello Arlind- thank you so much for the help. One issue, once the user is logged in, can the CUSTOMER LOGIN text change to Hi [customer name] - LOGOUTBasically what i was looking for isBefore loginHi Guest - Login or Register | Cart Total: $0.00After LoginHi [customer name] - Logout | Cart Total: $0.00Thanks a tonSapan[deleted] repliedMarch 18, 2019 at 12:18pmHi Sapan, I understand, you can remove the previous code and add this code: https://d.pr/n/cp4vF1+ This will add the logout URL and the name: (view large image) 3Sapan repliedMarch 18, 2019 at 7:11pmThanks, it worked.1 Like[deleted] repliedMarch 19, 2019 at 8:04amHi Sapan, I'm happy to hear that I wish you a great day! Will set this ticket as solved from here. P.S: If you like the theme, it would help us a lot if you could give us a five-star rating on Themeforest from your Downloads tab. A huge thank you from me and Laborator in advance. Sign in to reply ...
Hello-
How and where can i edit/add the widgets that comes in the drop down list in the Theme Options (please see attached screenshot).
I do not need the date along with the customer login instead need a wishlist link on top bar, how to do that
Thanks
Hi Sapan,
If want custom text or widget simply add your own text like shown below:
(view large image)
The result will be:
(view large image)
I hope this will help you.
Hello Arlind-
thanks for the help. I want to show Customer Login/My Account and Cart Total on the top right.
Contact Us and Wishlist on the top left. Can you please provide the codes?
Also, how can i edit an existing widget in the dropdown list.
Thanks
Sapan
Hi Sapan,
To show these custom widgets I have coded for you custom shortcodes to show in header > top menu, so please add this code in functions.php:
Then in Theme Options set these shortcodes:(view large image)
The result:
(view large image)
Hello Arlind-
thank you so much for the help. One issue, once the user is logged in, can the CUSTOMER LOGIN text change to Hi [customer name] - LOGOUT
Basically what i was looking for is
Before login
Hi Guest - Login or Register | Cart Total: $0.00
After Login
Hi [customer name] - Logout | Cart Total: $0.00
Thanks a ton
Sapan
Hi Sapan,
I understand, you can remove the previous code and add this code:
This will add the logout URL and the name:
(view large image)
Thanks, it worked.
Hi Sapan,
I'm happy to hear that
I wish you a great day!
Will set this ticket as solved from here.
P.S: If you like the theme, it would help us a lot if you could give us a five-star rating on Themeforest from your Downloads tab.
A huge thank you from me and Laborator in advance.