plugins - Is an Office a custom post type

Closed. This question is opinion-based. It is not currently accepting answers.Want to improve this question? Update the

Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 5 years ago.

Improve this question

In an upcoming WordPress project I have to display a listing of offices, and these offices would have a bunch of user fillable fields.

I have spent some time thinking about the anatomy of an office and decided it would have the following:

Things that make up an office (in my scenario):

  • Name
  • Address line 1
  • Address line 2
  • City
  • Street
  • Postcode
  • Is opening soon?
  • Opening date?
  • Latitude
  • Longlitude
  • Summary/ short description
  • Price per day currency
  • key points - access, parking, cafe, other assets
  • Contact phone number
  • Contact email
  • Description of location/ centre
  • Key features and benefits
  • Photo of tour guide for office or centre
  • Directions by tube/ train, bus, driving etc
  • Reviews
  • Photography
  • Given name
  • legal name

I'm fairly new to WordPress but from the list I have given, would an office qualify as a custom post type, or is the leaning more towards a plugin or custom tables?

I feel like things like key features would themselves be a taxonomy type much like the use of tags. For instance an office could have stuff like:

  • Parking
  • Wi-Fi
  • Vending machine

I'm just a bit hazy about what counts as what.

Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 5 years ago.

Improve this question

In an upcoming WordPress project I have to display a listing of offices, and these offices would have a bunch of user fillable fields.

I have spent some time thinking about the anatomy of an office and decided it would have the following:

Things that make up an office (in my scenario):

  • Name
  • Address line 1
  • Address line 2
  • City
  • Street
  • Postcode
  • Is opening soon?
  • Opening date?
  • Latitude
  • Longlitude
  • Summary/ short description
  • Price per day currency
  • key points - access, parking, cafe, other assets
  • Contact phone number
  • Contact email
  • Description of location/ centre
  • Key features and benefits
  • Photo of tour guide for office or centre
  • Directions by tube/ train, bus, driving etc
  • Reviews
  • Photography
  • Given name
  • legal name

I'm fairly new to WordPress but from the list I have given, would an office qualify as a custom post type, or is the leaning more towards a plugin or custom tables?

I feel like things like key features would themselves be a taxonomy type much like the use of tags. For instance an office could have stuff like:

  • Parking
  • Wi-Fi
  • Vending machine

I'm just a bit hazy about what counts as what.

Share Improve this question asked Feb 17, 2020 at 12:39 Jesse OrangeJesse Orange 1131 silver badge7 bronze badges 1
  • Hi. You should consider rephrasing your question. As it stands now, it's off topic. – Howard E Commented Feb 17, 2020 at 13:07
Add a comment  | 

2 Answers 2

Reset to default 1

How you store your data has nothing to do with whether it is add/edited/removed from a plugin or your (child) theme's functions.php file. So I'd say that your question is whether to add a custom post type or use a custom table for you 'office' entity.

You being new to WordPress, I'd advise you to go with custom post types. And use some plugin to create and manage it (like Pods or Custom Post Type UI). You can start off testing and making changes visually, which I think will be very convenient in your case. Then you can opt to implementing it with your own code.

Those plugins also allow you to add custom taxonomies for your added custom post types, so you should be good to go.

It sounds like your question is more around how to save all the custom data points, rather than around post types.

Yes, when you have a content type where you're planning to add a lot of custom data outside of regular post_content, a custom post type does often make sense. That's because this allows you to easily set up a single-posttype.php template in your theme which will handle all the output of the other data.

As to how and where to save the custom data, you might actually do better to build custom Blocks to hold each data point, and you can then set up a CPT template that forces each one to have all that data in that order, if you like.

However, if you plan to do any querying based on the extra data, custom taxonomies would serve you much better. It is difficult (at best) to query for specific blocks in post content; it is difficult (at best) to query for data you've saved in other tables; and your other option - saving the custom data as postmeta - makes for very slow queries. So if you ever plan to have search or filtering options to find an office by any of its data like parking, wi-fi, etc., your best bet would be to set up Office as a CPT, and also set up custom taxonomies associated to that CPT.

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

相关推荐

  • plugins - Is an Office a custom post type

    Closed. This question is opinion-based. It is not currently accepting answers.Want to improve this question? Update the

    13小时前
    60

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

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

关注微信