blandanomics
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
-
Forum: Fixing WordPress
In reply to: A WordPress "news feed"Works like a charm. Thank you very much!
Forum: Fixing WordPress
In reply to: A WordPress "news feed"So, I spent a night messing with this. I have the following code in my functions.php file:
<?php add_action('created_term', 'post_tax_to_feed', 3); function post_tax_to_feed( $term_id, $tt_id, $tax ){ if( $tax == 'company' ){ // Create post object $my_post = array( 'post_title' => 'My post', 'post_content' => 'This is my post.', 'post_status' => 'publish', 'post_author' => 1, ); // Insert the post into the database wp_insert_post( $my_post ); } } ?>Whenever I create a new “company” I get the following error:
http://www.flickr.com/photos/technicallyphl/5275229736/
After refreshing the page the taxonomy gets created but no post is made.
Any ideas on what’s wrong?
Forum: Fixing WordPress
In reply to: A WordPress "news feed"nevermind, i see this goes into the functions file. Thanks for all your help. I’ll have a hell of time playing with this.
THANK YOU!
Forum: Fixing WordPress
In reply to: A WordPress "news feed"This looks great thanks for your help. I think I get how to use wp_insert_post, but do I put the code in the loop?
Forum: Themes and Templates
In reply to: Custom classes for each <li> when listing pages/catsThanks Otto and Ben!
Forum: Themes and Templates
In reply to: Custom classes for each <li> when listing pages/catsThanks for getting back to me.
I noticed on this guy’s archive page has different colors for different categories.
Viewing 6 replies - 1 through 6 (of 6 total)