Loops in category description

What you want to do is to group fruits by color. In WordPress term appropriate mechanism for that is taxonomy (categories and tags are examples of taxonomy). I would create a custom taxonomy “fruit color” where terms would be individual colors and assigned to fruits. Then your display logic would be to: retrieve all fruit … Read more

Custom CSS to resize elements in multiple categories

Well, I think you could use the CSS begins with selector to select all div’s that begin with category- div[class*=’category-‘] #main { width: 300px!important; } so as you add them, it will still affect any class that begins with them. Then, assuming you have 1 or 2 categories you don’t want to have the property, … Read more

Displaying posts from a Category where the Category ID or slug is not known

WordPress uses the following hierarchy to determine which file should be used to display the category page: category-slug.php category-ID.php category.php archive.php index.php Removing all of the “category-slug.php” and “category-ID.php” files whilst leaving just one file called “category.php” should do the trick. http://codex.wordpress.org/Category_Templates

Custom category for posts via XMLRPC

You can do it by sending the 5th parameter to wp.newPost, like this: $request = xmlrpc_encode_request( “wp.newPost”, array( 1, $xmlrpc_username, $xmlrpc_password, $content, $terms) ); Please note the $terms should be in this format: ‘Taxonomy names as keys, array of term IDs as values’, according to the Codex. FYI, here is another thread related to your … Read more

Changing Permalinks for Category Pages Only

is rare, but it would have to default as you run you want. This forces the operation that you need function my_category_link( $termlink, $term_id ) { $term = get_term( $term_id, ‘category’ ); $ancestors = get_ancestors($term_id, ‘category’); if( !count($ancestors) ) return $termlink; $hierarchical_slugs = array(); foreach ( (array)$ancestors as $ancestor ) { $ancestor_term = get_term($ancestor, ‘category’); … Read more