CPT Metabox with email notification
WP doesn’t have a real Cron Job System/APi, but it got the Schedule API, as you can see here. Other related functions can be found here in codex filed under “See Also“. That’s the closest you will get with WP.
WP doesn’t have a real Cron Job System/APi, but it got the Schedule API, as you can see here. Other related functions can be found here in codex filed under “See Also“. That’s the closest you will get with WP.
Use get_post_custom, it will return an array of all the posts meta info. http://codex.wordpress.org/Function_Reference/get_post_custom
I ended up solving this by doing essentially one thing in a couple places. WordPress doesn’t let you specify a particular type for your meta data and stores everything as strings. As such, I added an extra meta data field that I used as the actual timestamp (using strtotime to convert it to a unix … Read more
Dan, the problem is that when you save the post meta, it’s using a name that doesn’t exist as you’ve added ‘_team1ban_1 etc, but the code you’ve linked to looks for inputs named $fields[‘id’]. If you want to use the linked framework, I suggest you add them as separate fields. (i.e. three separate select boxes). … Read more
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
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.
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
You might wish to try; <?php $mykey_values = get_post_custom_values(‘my_key’); foreach ( $mykey_values as $key => $value ) { echo “$key => $value (‘my_key’)<br />”; } ?> Where my_key would be equal to songs. Another example of what I might do in a situation where I am dealing with multiple values; <?php global $post; $meta = … Read more
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
Do you want to change author? If yes, you can easily do from admin area. Go to domain.com/wp-admin/edit.php, press Quick Edit and select the user from dropdown.