Every Post in WordPress is filed under one or more Categories. Categories allow the classification of your Posts into groups and subgroups, thereby aiding viewers in the navigation and use of your site.

learn more… | top users | synonyms (1)

17
votes
5answers
12k views

Adding Fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?

The question is "How do I add one or more fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?" This question was asked on the wp-hackers list August 1st 2010 and I ...
16
votes
3answers
4k views

Adding categories to custom post type in permalink

I know people have asked this before and have gone as far as adding the custom post type, and rewrite for permalink. The problem is I have 340 existing categories which I would like to continue ...
11
votes
5answers
5k views

Can I add a Category Metabox to attachment?

I am using register_taxonomy_for_object_type() to add the Category taxonomy field to Media uploads (attachments). I'm using this code to do so: add_action('init', 'reg_tax'); function reg_tax() { ...
10
votes
4answers
780 views

What is the difference between a “tag” and a “category”?

I have been using WordPress for several years, but have yet to see a reason to employ tags over categories or tags with categories. What is the thinking behind the two, and when are each appropriate? ...
9
votes
4answers
5k views

WordPress Multisite - global categories

Setting up a WP multisite instance - the client has an existing ontology / set of categories that they want to classify all content across the set of blogs. Also the desire is that any new categories ...
9
votes
7answers
22k views

Can I set a default featured image for a category?

I'm setting up a site with a theme that takes advantage of the "featured image" feature of WordPress. Since my end users are not the most tech saavy in the world, I'd like to set things up so that the ...
8
votes
2answers
219 views

Individual rss feed entry length for categories?

I know how to retrieve the rss2 feed from a category in wp, namely adding /feed behind the category name. However when I do this, not all entries from that feed are included in the rss, this is ...
8
votes
1answer
1k views

Is there an easy way to make a meta box have the tabs like the Categories meta box has?

My question is pretty much summed up in the title. I'm dropping a meta box in the New Post / Edit Post admin page, and I want to be able to set it up with tabs like the Categories meta box has. I ...
7
votes
7answers
7k views

Get Category ID inside Category template

how do I get the cat ID inside the Template. Very important: I can not do it by the name, because we have muliple cats with the same name. Only the slug is different. If I'd get the slug, it would be ...
7
votes
2answers
297 views

Get rid of Wordpress category, tag and author archives?

I have searched the net with no success on what should be an easy thing. I have a highly customized blog with pages, sub pages and posts. While I rely heavily on the use of categories and tags I ...
7
votes
3answers
2k views

How can I allow commas in tag names?

I want to allow commas in tag names? For example, "hello, world" or "portland, or" but Wordpress keeps separating them. I can do it from the categories page: And it shows up fine. But anything ...
7
votes
0answers
351 views

Wordpress: Can I add categories/tags to all sites in my network at once?

I've installed Wordpress 3.1.2, and have enabled the multi-site network. Each employee in my department can now have their own company blog. I was hoping to provide a bunch of pre-defined categories ...
6
votes
2answers
2k views

How to check if I'm on the last page of posts?

I want to display some text on the last page that isn't displayed on the other pages. For example, on category pages: url.com/category/categoryname/page/6 or last page of all posts listed on the ...
5
votes
3answers
3k views

Plugin for custom sort order for categories?

I'd like to employ a sort order option in my theme to allow categories to be sorted similar to pages. Can anyone recommend a plugin that does this?
5
votes
3answers
7k views

How do you add categories to custom post types in WordPress?

I'd like to be able to have categories of a custom post type, how do you set this up? update I want to keep the default categories for regular blog posts, but a separate set of categories just CPT. ...
5
votes
1answer
2k views

Force category choice before creating new post?

How can I force the user to first choose a category before continuing to the editor when creating a new post? I want to set some default content, but this is based on the category, so I need to know ...
5
votes
4answers
1k views

What is a good robots.txt?

What is the "best" setup for robots.txt? I'm using the following permalink structure /%category%/%postname%/. My robots.txt currently looks like this (copied from somewhere a long time ago): ...
5
votes
2answers
3k views

Adding Categories to a WordPress Custom Post Type?

Is it possible to add categories to a Custom Post Type in WordPress?
5
votes
3answers
1k views

Decreasing the Memory Consumption of a WordPress Site?

The test site requires a lot of memory when viewing some category/archive pages. I met with the following error messages yesterday: Fatal error: Allowed memory size of 33554432 bytes exhausted ...
5
votes
1answer
477 views

How to get current_cat in navbar, in single post

In a site I have using Wordpress 3.0, when I'm in a single post, the navbar showing the categories doesn't give the parent category the class of "current_cat" and therefore that category is not ...
5
votes
1answer
576 views

Can't custom taxonomies have same terms (slugs) as categories?

I knew that it's not possible to have same terms (term slugs) under categories and tags, but surprisingly, as I realized today, that's the case with custom taxonomies as well. So for instance, if my ...
5
votes
5answers
1k views

Different post sort order within different categories

I need to give each post a unique post order for multiple Categories (per post) it is in. I can imagine a solution using custom fields whereby for each Category there is a corresponding custom field ...
5
votes
2answers
6k views

get_categories for custom post type with a specific custom taxonomy attached

Basically I have a custom post type of 'products' which has two taxonomies attached to it...the normal 'category' and a custom taxonomy called 'brands'. I have a page which is 'brand' specific. On ...
5
votes
4answers
3k views

How to export categories in wordpress

I want to export all Wordpress categories (no posts, just categories) from one blog to another. How can I do that ?
5
votes
1answer
493 views

Weird behaviour when adding terms/term_taxonomies programmatically

This certainly looks like a bug to me. I put together the following code for you to test it on a fresh install. Basically, the code will add two sub categories under the "uncategorized" to achieve ...
5
votes
2answers
1k views

Share one taxonomy across multiple blogs in 3.0 [duplicate]

Possible Duplicate: WordPress Multisite - global categories I have a series of blogs that will use some, but not all, of the same posts. We have one blog where many of the posts are ...
4
votes
3answers
5k views

add_action hook for completely new post?

publish_post Runs when a post is published, or if it is edited and its status is "published". Action function arguments: post ID. -Plugin API Documentation I've added the publish_post ...
4
votes
3answers
399 views

5 blogs on one WordPress site

What is the best way to have multiple blogs on one site? I am not talking about Multisite. What I want is one website with 5 blogs. All accessible from one menu and editable from one backend, I could ...
4
votes
1answer
234 views

is_category() in pre_get_posts strange error

I have a function that sets posts_per_page option depending on the category viewed. I discovered and error which I can't really understand: first this is how I get the error: function ...
4
votes
1answer
85 views

Hook when category is added to post

I'm trying to do something when a category is added to post and saved. I thought that using the save_post hook would have registered when a category is added to a post, but it doesn't appear to. When ...
4
votes
1answer
5k views

List all subcategories from category

How can I get all subcategories from a certain category?
4
votes
2answers
2k views

How to add category to: 'wp-admin/post-new.php'?

I want to have a link to create a new post that sets the category also. I have tried wp-admin/post-new.php?post_category=12 and wp-admin/post-new.php?cat=12, but neither worked. I also tried using ...
4
votes
2answers
420 views

Category checkbox list tree changes when editing a post

I'm setting up the categories for my website and I have them like so: That's it, I have children of the same name but they are not interchangeable. If that bugs you just think that they have ...
4
votes
3answers
978 views

Posts in multiple Categories different single.php

I am smashing my head against some code. Here is the situation: I have one post in 3 different categories, this post has to be visible in "category 1" with the single1.php, in "category 2" with ...
4
votes
3answers
3k views

Wordpress Multiple Category Search

From few months I am digging into wordpress for multiple category search options, and finally came up with this. I just found that wordpress allows multiple tags, which means that if in your URL you ...
4
votes
2answers
352 views

Multisite - Protect categories from deletion?

UPDATE: For anyone following this thread, the plugin solution does work, but seems to have a problem on my multisite format. I have now tested on 3 individual installs and on 3 multisites. On the ...
4
votes
2answers
2k views

Show Sticky Posts in Category Archive

I'd like to be able to show sticky posts at the top of category pages. I'm using archive.php for my category page. I'm using the code below to display sticky posts at the top of my category archive ...
4
votes
1answer
415 views

Add forward slash on categories url (serve one version of a url)

How can I a add forward slash on categories URLs and serve only that version of a category (meaning URLs not ending in forward-slash will redirect to URLs ending in forward slash). I manage to remove ...
4
votes
1answer
153 views

Using wp_category_checklist in a widget

I'm trying to use wp_category_checklist in a widget to display a list of checkboxes which, when saved, remain ticked. I'm having awful trouble at the moment getting them to save, as as far as I know ...
4
votes
1answer
175 views

is_category() function

I have category which name is '51m series' (it has id 135). Why the expression is_category(51) is true on this category page? I think it should be false according to Wordpress Codex. Is it a bug? ...
4
votes
2answers
856 views

Catch 404 after changing permalink structure from /%postname%/ to /%category%/%postname%/

I made a site some time ago and after some days some posts were indexed by search engines. Today I changed the permalink structure from /%postname%/ to /%category%/%postname%/. After that, when ...
4
votes
2answers
181 views

Rearranging posts based on categories

Hey everyone on Stackexchange! I'm trying to find a way to prioritize posts based on a category in a loop, which is sorted by dates. All posts are grouped under their respective dates. The date ...
4
votes
2answers
3k views

What's the URL for a category archive?

If my category URL is: /blogs/category/foo and my archive URL is: /blogs/2011/02/ what's the URL for 'foo' blogs from February 2011?
4
votes
1answer
593 views

Multisite blog converting categories to subdomains

Having http://site.com/category/xyz = http://xyz.site.com/ I would like to move the content from each category to its equivalent subdomain blog, so that when I will access http://site.com/new-post/, ...
4
votes
1answer
350 views

How to show list of posts by author and category?

Let three categories and their IDs: cat1 = 1 (parent) cat2 = 2 (child of cat1, parent of cat3) cat3 = 3 (child of cat2) Let each category has 3 posts, they are: post1, post2, post3. And each posts ...
4
votes
2answers
103 views

Randomise results from a category page?

I have my standard category page. On this page, I'd like to put a button which, when clicked, randomises the results shown on the category page. I know I could make a rand-category.php page and send ...
4
votes
2answers
567 views

Changing Top Level Items into Radio Buttons in the Categories Meta Box?

I know it is possible to change the WordPress category list to radio buttons in the admin panel for posts, but I would like to make the just the Parents radio buttons and the sub categories or ...
4
votes
2answers
2k views

How can I get posts in a subcategory to display on it's parent categories archive page?

Currently when you display an archive category page, it only displays it for the main parent, and doesn't display any of the posts that may be in the subcategories under it's parent. How can I alter ...
4
votes
1answer
521 views

Custom post types with their own permalink structure

My main posts are news items (category "news"). Therefore, I used global URI writing in the following format: /year/month/post-name I also have posts that contain photo albums (category "photo") but ...
3
votes
5answers
3k views

Hide Category from Blog?

I am using the Boldy theme from Site5 on a v3.1.2 site. The way this theme works, is that there is a portfolio, (which I am using as a case studies gallery) that pulls in posts from a specific ...