strange behaviour of template_redirect in IE8

I am updated the answer, so that it will be helpfull to others as well. (For IE, IIRC it’s 512 bytes) Helpful links: https://stackoverflow.com/questions/11121286/404-page-not-showing-up-in-ie9#answer-11133855 https://stackoverflow.com/questions/3970093/include-after-php-404-header-returning-oops-this-link-appears-to-be-broken

Getting error while trying to use custom comment function

You should not have the () on the callback field. You shouldn’t need the add_action so remove add_action(‘load_comments’, ‘custom_comments’); And try: wp_list_comments(‘type=comment&callback=custom_comments’); Also, you should extract the $args so they are available in your function: function custom_comments($comment, $args, $depth) { $GLOBALS[‘comment’] = $comment; extract($args, EXTR_SKIP); //etc http://codex.wordpress.org/Function_Reference/wp_list_comments

action future_post returns wrong date

function on_post_scheduled( $post_id, $post ) { // If this is just a revision, don’t do anything. if ( wp_is_post_revision( $post_id ) ) return; // If this is a ‘post’ post and post status is future. if ( (‘post’ == $post->post_type) && (‘future’ == $post->post_status)) { // do the thing zhu li! wp_die(‘<pre>’.print_r($post,true).'</pre>’); } } add_action( … Read more

WordPress HTML Helper

The short answer is that there isn’t one. WordPress templating consists mostly of raw PHP and Template Tags API. The API is more focused on outputting specific content, than producing specific HTML. As result the technique is pretty much unknown in WordPress development. It doesn’t mean that you can’t use one, but it’s just not … Read more