Setting Event to Expire Using Custom Metabox

Have a look at the Post Expirator plugin. The Post Expirator plugin allows the user to set expiration dates for both posts and pages. There is a configuration option page in the plugins area that will allow you to seperataly control whether or not posts/pages are either deleted or changed to draft status.

Attaching a metabox to a single post

Since you are familiar with the how to create metabox using add_meta_box already, I’ll skip to the relevant bits. You can either conditionally add_meta_box depending on the current post title, or ID, (this is the preferred method) or, you can conditionally remove_meta_box depending on the the post displayed. To detect the current post ID you … Read more

Add text to metabox input text field from Thickbox

What your code in; jQuery(document).ready(function(){ // your code here… }); …and in fact your code should look like this; jQuery(document).ready(function($){ $(‘.insertdownload’).click(function(){ var did = ‘this is only a test’; did=did.replace(‘download-‘, ”); if ($(‘#format’).val(‘1’)) { $(‘#my_new_field’).val(‘[download id=”‘ + did + ‘” format=”‘ + $(‘#format’).val() + ‘”]’); } else { $(‘#my_new_field’).val(‘[download id=”‘ + did + ‘”]’); } … Read more

Remove “minor-publishing” div from Publish admin metabox

In short- no. The html in question is hard-coded in the post_submit_meta_box callback function. You can, of course de-register the publish metabox and re-register your own which mimics post_submit_meta_box (but making your alterations) and being sure to keep the names of the inputs exactly the same. This method has been outlined the following posts where … Read more

Form submit from modal window to parent window

Use the parent method to pass data back to your meta field. Create a JS function to handle the passing of data from Thickbox to the meta field: function foo_interstitial(data){ $(‘.form-field-selector’).val(data); } Add a submit handler to your thickbox instance that passes to the parent.foo_interstitial() function. $(‘.thickbox-submit-selector’).submit(function(){ var _value_to_pass = $(‘.field-to-pass-selector’).val(); parent.foo_interstitial(_value_to_pass); });