So I've setup a 'discontinued' attribute in Magento 2. I plan to use this to set a badge on the product to let customers know if a product is discontinued. I was able to create the attribute and load some products with this attribute to 'Yes'. The problem is that this attribute is now a selectable option on the product page. I was pretty sure it was possible to create an attribute for back end use only but have been all through the admin pages and done some research an haven't been able to locate an option for this. Any ideas?
Don't know how it works on 2, but on my 1.7 there is a attributes page, where you can set visibility, scope and others. On mine, is under catalog dropdown menu.
Hope it helps!
So after some more digging I was able to figure out the issue. I had already set all of the visibility options to not visible on front end, but my import process was setting the discontinued attribute on the parent configurable product variations which was causing it to show up on them only. After I tweaked the import process to not include the attribute for config products the attribute can be used without the dropdown visible. Hope this helps anyone who has a similar issue.
If you got to Admin > Stores > Attributes > Product
Then navigate to the Storefront Properties section and select the attribute relating "discontinued", you will be able to set the visibility.