Exclude categories from homepage but not from sidebar
You may have to alter the loop on the homepage. Set it up in your index.php: if ( is_home() ) { query_posts( ‘cat=-5,-34’ ); } and you should be good to go.
You may have to alter the loop on the homepage. Set it up in your index.php: if ( is_home() ) { query_posts( ‘cat=-5,-34’ ); } and you should be good to go.
Easy Fix … since I use feedburner I can use their “burn feed title” service, which does exactly what I want!
The problem was in how the the categories were stored in the array that didn’t go with the meta box code. To resolve the issue I’ve used a function (kindly provided by Jonathan Kuhn) that wrapped the categories in a way that I could use with the mate box code. Here’s the function: // Wrap … Read more
I would create custom post meta for this data, as it seems the most logical. It should be easy to implement, since you don’t need to expose this custom meta data to the UI; just add a callback to save_post. You can use wp_get_theme() to retrieve information about the current Theme. This function returns an … Read more
http://codex.wordpress.org/Function_Reference/next_post_link#Text_As_Link.2C_Without_Post_Title.2C_Within_Same_Category in same category = true is the trick
Modify the callback and check the post category: function excerpt_read_more_link( $output ) { global $post; if ( in_category( ‘news’, $post ) ) return $output . ‘<a href=”‘. get_permalink( $post->ID ) . ‘”>more</a>’; return $output; } And you should prefix the function name. In its current form it is not safe enough.
If you want to add extra fields to a post in the admin area, use the Advanced Custom Fields plugin. It is pretty good and has a lot of options.
To keep it simple and unique I would use a custom post type combined with a custom taxonomy called “Photos”. Registering a custom post type allows you to customize what the input is and the dashboard, along with making it easier to work with code wise, since it is separate from the default “posts”. You … Read more
Answering to this Question, How to add Custom Blog Options to new blog setup form?, I ended up doing a plugin that does exactly that: adds a blog meta field to give each site a Category. It’s a simple meta field, meaning: no category tree. I just revised the code and updated. Available in GitHub. … Read more
showposts is replaced with posts_per_page (see Pagination Parameters). Also orderby value is invalid (see Order & Orderby Parameters). $queryObject = new Wp_Query( ‘posts_per_page=1&cat=23’ );