Join our new community forum for support & discussion
Join NowHome › Support › Themes › RentalHive › How to customize the Account page
How to customize the Account page
-
AuthorPosts
-
flantascience 10 months, 1 week ago
Hi – I’m trying to find where to edit the Account page.
For example, if I want to add a heading to the top of the page saying “User Dashboard” or add links to the sidebar menu.
Hi,
There are 2 ways to edit the account pages, using Templates https://www.youtube.com/watch?v=YRKVBSKxhIo&ab_channel=HivePress or code customizations https://www.youtube.com/watch?v=LkojYp-8uwY&ab_channel=HivePress
If you mean adding new menu items it’s also possible, but requires custom code snippets https://gist.github.com/hivepress/416a70aced578730b0335f9abdcafdc8flantascience 10 months, 1 week agoWhen adding a new menu item, how do I get the content of the link to appear in the right-hand side of the Account page? Similarly to when someone clicks the “Listings” link, it shows the listings on the same page. https://snipboard.io/70nYBu.jpg
flantascience 10 months, 1 week agoAnd when looking at the video re: Templates, I don’t see where to add the User Menu to the page. What is the name of this block/widget?
If you mean adding some custom page content that corresponds to the link you add this would require the advanced customizations, e.g. adding a new template based on the account page. If you’re familiar with customizations please check how the existing account pages are implemented in hivepress/includes/templates, along with their URL routes in hivepress/includes/controllers.
If you added a template that overrides the user account page please check if there’s a block named Menu in the block list.flantascience 10 months, 1 week agoFor the template builder tool, I only see a “Navigation” option for a block, and the User Account menu isn’t a selectable option. (only ‘footer’, ‘header’, ‘properties’, and ‘social’ -> https://snipboard.io/ZUig9y.jpg
With the customization, when I look at the /hivepress/includes/tempates/class-user-account-page.php, I see line #55 references ‘page_content’ ( ‘page_content’ => [], )
But don’t see any way to “send” content to fill this area of the page.Thanks for reporting this, it seems to be a bug, the template-specific blocks disappeared. We’ll release a fix for this as soon as possible (via the HivePress update).
If you want to create a new template programmatically this would require adding a custom HivePress extension https://www.youtube.com/watch?v=8IlHOL9aZzw&ab_channel=HivePress and adding a new template in /includes/templates that inherits the User_Account template, also a URL route for it. If you’re familiar with customizations please check how the existing user account Settings page is implemented.flantascience 9 months, 4 weeks agoI made some progress. I got three new menu items to show up. However, the “Submit a Listing” is the only one that is working. I believe the issue is with the ‘Route’. For the Submit a Listing page, there’s an existing ‘Route’. But for the other two, I added the URL to the page, and its not working. Any guidance? (Code is below)
add_filter( 'hivepress/v1/menus/user_account', function( $menu ) { $menu['items']['listing_submit']=[ 'label' => 'Submit a Listing', 'route' => 'listing_submit_page', '_order' => 123, ]; $menu['items']['calendar']=[ 'label' => 'Calendar', 'route' => 'https://luneh.com/calendar-testing/', '_order' => 122, ]; $menu['items']['files']=[ 'label' => 'Your Files', 'route' => 'https://luneh.com/file-sharing-testing/', '_order' => 121, ]; return $menu; }, 1000 );
Please try using the “url” parameter instead, then items will be linked to the static URLs you set, instead of HivePress routes.
-
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.