Adding custom Field To The Posts Listing
The easiest way is to use a plugin like Custom Field Template. This adds a custom field column to the “Manage Posts” page by default.
The easiest way is to use a plugin like Custom Field Template. This adds a custom field column to the “Manage Posts” page by default.
If its a regular custom field you can add this to your archive.php: //before the loop $rating_count = 0; $total_rating = 0; //in the loop $total_rating = $total_rating + get_post_meta($post->ID,’your_custom_field_name’,true); $rating_count = $rating_count + 1; //after the loop: $average = $total_rating / $rating_count; echo ‘the average rating for this tag is: ‘ . $average; Update … Read more
You can do custom query loop for that particular meta box for an empty value. Something along the lines of $check_city_value = get_post_meta($post->ID, ‘city_box’); ?> if (empty($check_city_value)) { echo ‘$check_city_value is either 0, empty, or not set’; } You would have to loop through all the posts to do this and for multiple meta box … Read more
For cron jobs, take a look at the Transients API. The rest could maybe be acchieved with something like the following. I have never ever used the transient API before and code’s not tested. function set_post_to_draft() { global $post; if ( get_post_meta( $post->ID, ‘set_to_draft_key’ ) == true ); return $post->post_status == ‘draft’; } set_transient( ‘post_to_draft_transient’, … Read more
There is no WordPress function called meta(). Try using get_post_custom() (Codex ref) instead. For example: //Address add_action( ‘woo_post_inside_before’, ‘my_address’ ); function my_address() { if ( is_single() && in_category(‘listings’) ) { global $post; $meta = get_post_custom(); echo ‘<h1>’ . $meta[‘address’] . ‘</h1>’; } } Note: I’m not sure you need to call global $post; in this … Read more
This plugin may be exactly what you’re looking for: http://wordpress.org/extend/plugins/register-plus/ Optionally, you may opt to create your own registration page in WordPress from scratch. This guide will help you: http://www.tutorialstag.com/create-custom-wordpress-registration-page.html
See the answers to this question: How to sort by meta value?
See wp_schedule_single_event() function. The general idea would be each time after you are done with a batch of users schedule next run few minutes ahead and pass info (such as offset from which user to continue) in arguments. On larger scale I’d consider looking into alternate more specialized solutions or simplifying your process. Mass emailing … Read more
Yes, you are doing it wrong. You are checking for the posts’ custom field value which the new post page will does not have, and editing older posts might also does not have the custom field set or may be set to an empty value. Yes, you need to check for the custom post type: … Read more
Why are custom fields conditional upon the Page template? Wouldn’t an easier, more elegant, and more intuitive approach be to use Custom Post Types?