adds and fixes the remove permalink function

fixes post type check using `get_post_type` and doesn't return anything if the post type is a notification, otherwise returns the permalink as usual.