Metabox doesn’t retain values

Many of the comments below refer to code used for debugging, which for clarity I’ve removed. I should have spotted this soon – you are adding only one row into the postmeta table, and that row has the key _my_meta. Before inserting the array int the table, WordPress serializes the array. When you retrieve the … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)