Target post type edit page to change view post button, how do I?

I am trying to change the link of the “View Post” button that appears next to the “Change Permalinks” button above the editor on post edit screens for a custom post type.

I have altered all the messages when a post is updated, published etc. but cannot figure out how to alter the button link. I’ll need to do this for the “Preview” button as well. The custom post type is not publicly queryable so I need my client to be able to click these buttons and be taken to the page that displays this custom post type (using a page template).

Read More

Any and all help is appreciated!

Related posts

Leave a Reply

1 comment

  1. »View Post« Button

    There’s a filter that you can use with a simple str_replace. Not the best solution, but there’s no other one:

    apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug)
    

    »Preview« Button

    For the »Preview« Text, there’s not filter (only for the link target), but you can take a look at this Answer by @toscho on how to use the gettext filters for that.