Is ‘nt_cat2’ something you or a theme/plugin has already added to the options database table? Was it properly populated with the ID of the category you’re trying to get a link for? Essentially, what exactly is being stored in ‘nt_cat2’?
Explaining what you’re trying to display (The current post’s category info for example.) would be helpful. Right now, assuming that ‘nt_cat2’ is in the database and holds a category ID, there’s nothing wrong in the code.
I I have created a theme option page and nt is the short name of my theme.
_cat2 is the id which gave the category. When I use this code, the link is not working (in the page source, I don’t see anything, it is showing blank)
Do the Quick Check, or go to your WP Admin and change the URL
Yup, best thing to check first would be that your stored option is in there correctly. Also, it’s probably not the problem, but it never hurts to mention it: whenever you directly change any files make sure to refresh any cache you’re using.