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
13k 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
5k 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 ...
12
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() { ...
11
votes
4answers
6k 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 ...
10
votes
4answers
881 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
7answers
24k 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
7answers
10k 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 ...
8
votes
2answers
231 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
2k 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
2answers
326 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
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 ...
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
356 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
773 views

Is There a Difference Between Taxonomies and Categories?

I've been reading the codex for WordPress closely and am confused about the vague definitions between what a Taxonomy is and what a Category is. For that matter, term is also a word that is used in ...
6
votes
1answer
8k views

List all subcategories from category

How can I get all subcategories from a certain category?
6
votes
3answers
8k 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. ...
6
votes
2answers
4k views

Adding Categories to a WordPress Custom Post Type?

Is it possible to add categories to a Custom Post Type in WordPress?
6
votes
1answer
147 views

Inject post (from specific category) between posts in Loop

I would like to add a post (from specific category) between posts in the WordPress Loop (such as 'Sponsors'). Example: P P P S P P S P P S P P How can I achieve this? I am a beginner with coding, so ...
6
votes
1answer
1k 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 ...
6
votes
5answers
4k views

How to export and import taxonomies (category, tag and/or custom taxonomy) and their terms

I want to export all Wordpress categories (no posts, just categories) from one blog to another. How can I do that ?
5
votes
3answers
32k views

How to Display Product specific to a category with WooCommerce Plugin? [closed]

I'm using plugin Woocommerce to do shop online. I have many categories for example shoes, clothes and so on. How can I display the products of specific category? I see such product loops of on the ...
5
votes
3answers
4k 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
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
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
519 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
5k views

Get posts from sites in Multisite?

I'm trying to pull multiple sites posts. For example, I can pull out a single site posts by a category and total posts 10. But I'm trying to pull out both posts from two separate Multisite blogs 1 ...
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
7k 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
1answer
553 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 ...
5
votes
2answers
295 views

WP 3.9 TinyMCE no longer loads on category description editor

I've used this script below inside functions.php since WP 3.5 It converts the standard category description editor to a rich text editor. Unfortunately, after upgrading sites to WP 3.9, the ...
4
votes
3answers
6k 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
5answers
6k views

Wordpress and isotope filtering

Im trying to use Isotope(http://isotope.metafizzy.co/) to filter my Wordpress posts, http://i44.tinypic.com/fco55k.jpg this is how my site looks like, i would like to filter posts depending on a post ...
4
votes
3answers
407 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
527 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
135 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
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
585 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
2answers
2k views

How can I hide a category from Contributors in the edit/add new post screen?

I have a situation where I need to hide a specific category and it's children from users who are logged in as Contributors. I don't want them to see this category and it's children in the categories ...
4
votes
3answers
1k 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
1answer
65 views

How to add classes to images based on their categories?

I need to be able to: 1.) assign categories to images and 2.) add classes to all images that correspond to their assigned categories. I was able to add categories to images with the following: ...
4
votes
1answer
734 views

Exclude categories from Loop, queries, widgets, post navigation

I recently ha a use case where I needed to prevent a certain category from being displayed in the front-end. In detail I needed to exclude posts assigned to that category from the main query (“the ...
4
votes
2answers
428 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
618 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
318 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
424 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
1k 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 ...