if you want to add nofollow to a menu, then edit the menu, select screen options and enable Link Relationship (XFN). Then edit the menu item and in the Link Relationship (XFN) field add nofollow
your 1st suggestion was right all is done. but by hook also can I do this? But I want to add social media icons and pages in the footer in hirozontly how can I do that any tips?