Join our new community forum for support & discussion

Join Now

Home Support Themes ExpertHive List a Service Button inside de vendor dashboard

List a Service Button inside de vendor dashboard

  • Author
    Posts
  • Terry_tip

    I have another question Yven, i would like to hide the List a Service Button, just hide it without disabling new announces, and put a List Service button or link inside the vendor dashboard.

    For example:

    https://imagizer.imageshack.com/img924/5927/DczsDl.png

    Thanks!!

    yevhen developer

    It is possible to hide the header button with this CSS snippet:

    .header-navbar .hp-menu__item--listing-submit{
    	display: none;
    }

    Adding a custom button to the dashboard page is possible, but requires template customizations, if you are familiar with basic code changes please check this tutorial https://youtu.be/LkojYp-8uwY

    Also, if direct vendor registration is disabled in settings, users will not be able to add listings since the dashboard and listings pages appear only if the user already has at least 1 listing.

    Terry_tip

    I already hide the button with the snippet. Thanks! Can you help to add that option in the dashboard? I tried the tutorial in the video but i cant find the code of that button. The list a service option.

    yevhen developer

    Please try this PHP snippet. It will add this button only for vendors in account menu

    add_filter(
    	'hivepress/v1/menus/user_account',
    	function( $menu ) {
    		if(current_user_can('edit_posts')){
    			$menu['items']['custom_item_add_listing'] = [
    			'label'  => 'Add Listing',
    		    'url'    => hivepress()->router->get_url('listing_submit_page'),
    		    '_order' => 100,
    		];
    			
    		}
            return $menu;
    	},
    	1000
    );
    Terry_tip

    Thanks, thanks, thanks Yheven it works perfectly. Now our markeplace its working the way we want to. We’re very excited with the Hivepress Marketplace and the Experthive theme.

    We’ll asking more questions, that’s for sure hahaha.

    Terry_tip

    And here goes one more question i forgot, the button now appears in account menu to the vendors, but how can i show it to all users? the same way the main “list a service” button is always displayed on the header.

    yevhen developer

    Please try this PHP snippet

    add_filter(
    	'hivepress/v1/menus/user_account',
    	function( $menu ) {
    			$menu['items']['custom_item_add_listing'] = [
    			'label'  => 'Add Listing',
    		    'url'    => hivepress()->router->get_url('listing_submit_page'),
    		    '_order' => 100,
    		];
            return $menu;
    	},
    	1000
    );
    Terry_tip

    Thanks Yevhen!!!

Viewing 8 posts - 1 through 8 (of 8 total)

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.