Join our new community forum for support & discussion

Join Now

Home Support Themes TaskHive Add custom link in the menu dashboards vendor

Add custom link in the menu dashboards vendor

  • Author
    Posts
  • fsimoni

    Hi,
    Is there a snippet to add a link in the vendor’s menu? (only for this role)

    For example (before the settings link):
    How to do for…” or “Tutorials

    This link should open a page in modal view which contains a series of tutorials

    Tnx
    Federico

    yevhen developer

    There is no easy way to link a modal, but if you create a custom page for tutorials please try this PHP snippet. You can change fields with word ‘custom‘ and adjust '_order' by your requirements:

    add_filter(
    	'hivepress/v1/menus/user_account',
    	function( $menu ) {
    	    if(current_user_can('edit_posts')){
                    $menu['items']['custom_item_name'] = [
                        'label'  => 'Custom Item',
    		    'url'    => 'some custom url',
    		    '_order' => 123,
    		];
    	    }
                return $menu;
    	}
    );
    fsimoni

    PERFECT

    SOLVED

Viewing 3 posts - 1 through 3 (of 3 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.