Join our new community forum for support & discussion
Join NowHome › Support › Themes › ListingHive › My account section
My account section
-
AuthorPosts
-
gsmobina 2 years, 2 months ago
1. Need to add a custom menu tab with a section in My account area like the other menu items
2. How can keep all the other menu items on my account area always visible. currently listing, favorites, messages, packages, members, order tab gets visible only when info is there. i want to display this even when it is empty, may be with a message like ‘ no listings to show. add one’, no message to display, start messaging’ etc
1. This requires code customizations, please try using HivePress API if you’re familiar with PHP, you can use the “hivepress/v1/menus/user_account” filter.
2. Unfortunately it’s not possible because the check for empty pages is set in HivePress code, e.g. if there are no favorite listings then the menu item is not added.
gsmobina 2 years, 2 months agoI am not a developer, i just manipulate codes.
can you give me snippet for the 1st option using hivepress/v1/menus/user_account filter?
at least a sample?You can add a custom menu item with this snippet, but adding a new account section requires advanced customizations:
add_filter( 'hivepress/v1/menus/user_account', function( $menu ) { $menu['items']['custom_item_name'] = [ 'label' => 'Custom Item', 'url' => 'https://example.com', '_order' => 123, ]; return $menu; } );
gsmobina 2 years, 2 months agoThanks. I’ll see what i can do with this
gsmobina 2 years, 2 months agook. i tried using this, but if i use a url it will go out of my account page.
1. can i ‘echo’ the side menu of the account page to a custom page?
2. or, instead of url, can i use a popup? if can how can i create the popup?
3. or, i just need to display the shortcode on the custom item menu in my account. so how can i do this as a section without going to big customization?
Sorry, but this requires customization and it’s not part of HivePress support, I can only provide some general guidance about HivePress API – I can’t customize your client’s website for you.
If you install some popup plugin that supports URLs then you can set popup URL (e.g. via an anchor like “#something”) using the code snippet suggested above.
Shortcodes can be called using this function https://developer.wordpress.org/reference/functions/do_shortcode/
Creating a built-in “My Account” page with the same sidebar would require creating a custom template file in the child theme’s folder.
Hope this helps.
gsmobina 2 years, 2 months agoCreating a built-in “My Account” page with the same sidebar would require creating a custom template file in the child theme’s folder.
any guidelines to do this?
i have noticed that you are showing woocommerce order section to the hivepress my account, can i do the same way using the say ‘dashboard’ of woocoomerce to display to hive press my account? what best way to do this?
This would require adding a new extension, to declare the new page URL, define the template and action when this URL is accessed. Please consider some kind of a workaround, e.g. if it’s not a functional page (that doesn’t really require the account layout) you can simply add a custom URL to a page created in WordPress/Pages (using the code snippet above), and add “Return to My Account” button to this custom page if it’s required.
izaproch 2 years agoHello,
How can I add more custom menu item with this above snippet to my account page? Is it possible that same links will be shown if I log in with specific role? For example if I log in to the account with role employee i can see link to the dashboard where i can manage appointments. The role is for calendar that I use with Your theme ListingHive. I use White Label CMS and Menu editor to manage the access to the dashboard manu. Is it possible to do that for the myaccount links?You can add any static items with custom URLs using the snippet above (just copy the item definition line, change its name and details). Adding menu items with some conditions requires further customization.
izaproch 2 years agoIf I add new snippet with different
Custom Item
https://example.com
I can see only the last link and the first is gone- do I have maybee change somethink in the line'_order' => 123
, ?Please make sure that you set a different slug (it’s set to “custom_item_name” in the sample snippet above), each menu item should have a unique one.
alphagoldafrica 1 year, 7 months agoHi Ihor,
I am using the expert theme.
Will this section of the code ‘hivepress/v1/menus/user_account’ be the same in the expert theme? If not, what would the equivalent be for the expert theme.
Thank you,
CarolineYes, the same code snippet should be ok since both themes are powered by HivePress plugin.
alphagoldafrica 1 year, 7 months agoThank you very much Ihor
-
AuthorPosts
New Reply
This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.