Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a custom post type called 'contacts'. I want want to remove the status, post date and change the button from PUBLISH to SAVE. From what I can tell this may not be possible without changing core files (please correct me if I am wrong).

So, instead of trying to hack the PUBLISH metabox, I have the ability to remove the PUBLISH meta box all together using the Access Manager plugin. But I need to know how to readd a SAVE button that works the same way PUBLISH would.

Any ideas?

share|improve this question
    
Do you mean change it from "published" to "draft"? –  Teknophilia Dec 10 '11 at 21:26
    
No, since I am using this post type as a CONTACT, not as a POST, it does not make sense to say "PUBLISH" when saving. Plus, I don't want my users to see the other options that are in the PUBLISH metabox. So, the 'easiest' way of doing was to hid the PUBLISH metabox and add a new metabox with a SAVE button. Does that clarify? –  katemerart Dec 10 '11 at 21:30

1 Answer 1

up vote 2 down vote accepted

Not mine but modified from here. But if you pop this into functions.php or a plugin it will work.

add_filter( 'gettext', 'change_publish_button', 10, 2 );

function change_publish_button( $translation, $text ) {
if ( 'yourcustomposttype' == get_post_type())
if ( $text == 'Publish' )
    return 'Save';

return $translation;
}
share|improve this answer
    
Worked perfectly to get the PUBLISH button to say SAVE - ty! –  katemerart Dec 11 '11 at 2:22
    
I believe it may be more efficient (and precise) if you enqueue a js file for that post type and then change the value of the submit input with jQuery, targeting only that specific button. –  Ronnieinspain Jan 21 at 13:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.