Warning: Cannot modify header information (with a twist)

Goin with @One Trick Pony… Change: <?php /* You really don’t want to touch this file if you don’t know what you’re doing. */ ?> <?php class WP_LESS_Styles extends WP_Dependencies { …. To: <?php /* You really don’t want to touch this file if you don’t know what you’re doing.*/ class WP_LESS_Styles extends WP_Dependencies {…

Echo class depending on Parent category

you probably need to get the parent category of each of the post’s categories first. <?php $parent_cat = array(); $post_cats = get_the_category($post->ID); foreach( $post_cats as $post_cat ) { if( $post_cat->parent ) $parent_cat[] = get_category( $post_cat->parent )->slug; } ?> <article class=”post <?php if ( in_array( ‘dream-it’, $parent_cat ) ) { echo ‘ dreamit’; } if ( … Read more

How to retrieve the post_id of a tag page?

A tag page would be like other archive pages in that a loop of posts would be displayed, even if only one post has been assigned that tag. You’re check for post ID needs to happen during the <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> loop.

How can I default a new post to being saved?

This should work. It’s the way press-this gets the post id when you click the bookbarklet. add_action( ‘load-post-new.php’, ‘prefix_save_it’ ); function prefix_save_it() { // define some basic variables $quick = array(); $quick[‘post_status’] = ‘draft’; // set as draft first $quick[‘post_category’] = isset($_POST[‘post_category’]) ? $_POST[‘post_category’] : null; $quick[‘tax_input’] = isset($_POST[‘tax_input’]) ? $_POST[‘tax_input’] : null; $quick[‘post_title’] = … Read more