How can I remove css from a child theme?

Twentyten has a header.php file which has the style.css hardcoded into it: <link rel=”stylesheet” type=”text/css” media=”all” href=”https://wordpress.stackexchange.com/questions/40174/<?php bloginfo(“stylesheet_url’ ); ?>” /> There is no way to wp_dequeue_style because it is never “loaded” with wp_enqueue_style in the first place. To get that out of the header you’ll need to edit the twentyten theme (bad idea) or … Read more

Adding markup to column text in “Edit Pages” admin page

I found that there is a filter, manage_posts_columns (and a related manage_pages_columns), that lets you modify the column headers on the “All Posts” admin screen. Using this filter is pretty simple, as the filtering function takes in an associative array with the short name of the column as a key and the heading as the … Read more

Display custom list of tags in post/page editor with hooks

We can override the Ajax call to wp_ajax_get_tagcloud() and do a clean hack. <?php /* Plugin Name: Custom Admin Tag Cloud */ add_action( ‘wp_ajax_get-tagcloud’, ‘ajax_tag_cloud_wpse_99497’, 1 ); function ajax_tag_cloud_wpse_99497() { // PASTE ALL THE MODIFIED FUNCTION HERE // http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/includes/ajax-actions.php#L639 } Restore your core files to its original state, copy the modified function inside the above … Read more

Hide content editor for posts after approriate date

function disable_editor_for_old_posts_wpse_101106($post) { if (strtotime(‘-2 months’) > strtotime($post->post_date)) { remove_post_type_support(‘post’,’editor’); } } add_action(‘add_meta_boxes_post’, ‘disable_editor_for_old_posts_wpse_101106′); I couldn’t find a great hook for this but add_post_meta_boxes_* is early enough, and it passes the $post object to the callback. Basically the filter checks the post on the post edit screen and removes post type support based on the … Read more