When I assign a post to two categories always one of categories becomes the main category.
Is there any way to specify which category out of the two or more is the main category not a secondary category?
|
When I assign a post to two categories always one of categories becomes the main category. Is there any way to specify which category out of the two or more is the main category not a secondary category? |
|||
|
|
|
If by "main" category you mean the category that is used to create the permalink, the default is to use the category with the lowest ID. You can access the post also with an URL that contains another category, but the However, if you hook into the So you will need to create a UI in the post creation screen to select the "main" category, and hook into |
|||
|
|
|
What do you mean by main? I don't think there is such concept in post's data, but it may look like it for some purposes (for example category in permalink). Categories are retrieved in certain order - likely in order they are stored in database, equals order they were created in. |
|||||
|