Posted in blog

Filter the wp_get_archives() to add a cat_id to this function

// Filter the wp_get_archives() and add a cat_id to this function // Example: wp_get_cat_archives(‘type=monthly&format=option&show_post_count=1’, 46); add_filter(‘getarchives_where’, ‘custom_archives_where’, 10, 2); add_filter(‘getarchives_join’, ‘custom_archives_join’, 10, 2); function custom_archives_join($x,…

Continue Reading... Filter the wp_get_archives() to add a cat_id to this function
Posted in blog

update post date via function

$time = current_time(‘mysql’); wp_update_post( array ( ‘ID’ => $post->ID, // ID of the post to update ‘post_date’ => $time, ‘post_date_gmt’ => get_gmt_from_date( $time ) )…

Continue Reading... update post date via function
Posted in blog

Show future posts

From ‘the future is now’ plugin /* Show future posts */ remove_action(‘future_post’, ‘_future_post_hook’); add_filter( ‘wp_insert_post_data’, ‘futurenow_do_not_set_posts_to_future’ ); function futurenow_do_not_set_posts_to_future( $data ) { if ( $data[‘post_status’]…

Continue Reading... Show future posts