Hi,
I need to be able to get rid of the standard WP edit button so it doesn't appear on my custom posts.
I have a custom post type of 'job'. For the appropriate users to be able to use some frontend forms to update custom fields against the job they need the role permissions to edit the post (otherwise instead of the frontend forms I get a box saying the user doesn't have permissions to edit the post).
I don't want the users to be able to click the Edit button that appears because of this permission level and end up in the Dashboard to actually edit the job post. Their only edit should be by filling in the forms they're given.
The following code does disable the button completely but it also prevents the Edit option from working in the Dashboard as well so using Snippets I have to deactivate the function when I want to edit the jobs in the Dashboard.
function wpse_remove_get_edit_post_link( $link ) {
return null;
}
add_filter('get_edit_post_link', 'wpse_remove_get_edit_post_link');
Is there a better way to either achieve what I'm looking for or an better hook to use for the above function so it only affects the frontend display and not the Dashboard?
Thanks.