categories - Group listed elements by category

I'm quite new to wordpress so there's a lot of terms I'm missing... I'd like to have a list of eleme

I'm quite new to wordpress so there's a lot of terms I'm missing... I'd like to have a list of elements, grouped depending on a category.

For example, let's say I have a list of superhero movie names, I want the user to be able to group them either by hero or by franchise. It would look like this:

grouped by hero:

Iron Man
-Iron Man 1
-Iron Man 2
-Iron Man 3

Thor
- Thor 1
- Thor 2

Grouped by franchise:

MCU
- Iron Man 1
- Thor 1 ...

DCEU
- Batman 1
- Superman 1 ...

I have no idea if there are plugins or controls to help with this, don't know even how to look for the terms. The solution I was thinking of was to somehow assign to each movie a series of metadata tags, e.g.: to Iron Man 1 give it "hero:ironman", "franchise:mcu", "starring:rdjunior". And then pull from there, but it sounds quite convoluted...

Thanks in advance!

I'm quite new to wordpress so there's a lot of terms I'm missing... I'd like to have a list of elements, grouped depending on a category.

For example, let's say I have a list of superhero movie names, I want the user to be able to group them either by hero or by franchise. It would look like this:

grouped by hero:

Iron Man
-Iron Man 1
-Iron Man 2
-Iron Man 3

Thor
- Thor 1
- Thor 2

Grouped by franchise:

MCU
- Iron Man 1
- Thor 1 ...

DCEU
- Batman 1
- Superman 1 ...

I have no idea if there are plugins or controls to help with this, don't know even how to look for the terms. The solution I was thinking of was to somehow assign to each movie a series of metadata tags, e.g.: to Iron Man 1 give it "hero:ironman", "franchise:mcu", "starring:rdjunior". And then pull from there, but it sounds quite convoluted...

Thanks in advance!

Share Improve this question asked Feb 7, 2020 at 14:44 Miguel GardeMiguel Garde 132 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

The term you are looking for seems to be "Taxonomy", category and post_tag are base taxonomies, but you can register more taxonomies, depending on the needs.

Right now, you are in need of 2 taxonomies, "hero" and "franchise", once registered, you can affect them to a range of post_type.

I don't know if your "movie" is a CPT (Custom Post Type), but it should probably be.

(Edit) Forgot to give you some link in the Codex: https://codex.wordpress/Function_Reference/register_taxonomy

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744769359a4592662.html

相关推荐

  • categories - Group listed elements by category

    I'm quite new to wordpress so there's a lot of terms I'm missing... I'd like to have a list of eleme

    17小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信