Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
4 replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
source | link

Short, a new database table would be an absolute overkill.

I think, what you want to do is pretty much resembling the existing menu_order column in wp_posts. Using post meta is just fine, but add it on the the singular staff member posts from your custom post type. So you will have several custom order metas saved for them. And then retrieve the posts (staff members) with WP_Query on the different pages by category and add a meta_query according to the sort order meta field you want, last but not least order your query after the meta field, which means you will likely orderby you meta_value_num. Pretty much all the information you need you get on the WP_Query codex page.

Very brief outline, I hope it helps anyway, but as you are comfortable with saving the data, this should be enough to get you there.


Update:

As answer to comment.

No time for a complete answer, but some (more) general information that should help you.

Firstly, do not use query_posts see:

for the why.

Secondly, independent from how you will retrieve your list, you generally already have the $post_id's of the single staff posts available. You pretty much just have to make use of this information to make your update_post_meta call address the single posts, instead of the page. A little bit of code refactoring will be necessary, but it should generally be not overly hard to do.

Thirdly and lastly, there are a couple of good plug-ins available which are enabling post sorting via jQuery sortable and saving the data on per post basis. As mentioned above this mostly concerns the menu_order column, but you definitely should take a look at how they do it, because it will be pretty much the same for you, with the only difference that you are going to save your data to post meta fields. So get some inspiration from how it has already be done.

Again, I hope it helps and good luck achieving what you want.

Short, a new database table would be an absolute overkill.

I think, what you want to do is pretty much resembling the existing menu_order column in wp_posts. Using post meta is just fine, but add it on the the singular staff member posts from your custom post type. So you will have several custom order metas saved for them. And then retrieve the posts (staff members) with WP_Query on the different pages by category and add a meta_query according to the sort order meta field you want, last but not least order your query after the meta field, which means you will likely orderby you meta_value_num. Pretty much all the information you need you get on the WP_Query codex page.

Very brief outline, I hope it helps anyway, but as you are comfortable with saving the data, this should be enough to get you there.


Update:

As answer to comment.

No time for a complete answer, but some (more) general information that should help you.

Firstly, do not use query_posts see:

for the why.

Secondly, independent from how you will retrieve your list, you generally already have the $post_id's of the single staff posts available. You pretty much just have to make use of this information to make your update_post_meta call address the single posts, instead of the page. A little bit of code refactoring will be necessary, but it should generally be not overly hard to do.

Thirdly and lastly, there are a couple of good plug-ins available which are enabling post sorting via jQuery sortable and saving the data on per post basis. As mentioned above this mostly concerns the menu_order column, but you definitely should take a look at how they do it, because it will be pretty much the same for you, with the only difference that you are going to save your data to post meta fields. So get some inspiration from how it has already be done.

Again, I hope it helps and good luck achieving what you want.

Short, a new database table would be an absolute overkill.

I think, what you want to do is pretty much resembling the existing menu_order column in wp_posts. Using post meta is just fine, but add it on the the singular staff member posts from your custom post type. So you will have several custom order metas saved for them. And then retrieve the posts (staff members) with WP_Query on the different pages by category and add a meta_query according to the sort order meta field you want, last but not least order your query after the meta field, which means you will likely orderby you meta_value_num. Pretty much all the information you need you get on the WP_Query codex page.

Very brief outline, I hope it helps anyway, but as you are comfortable with saving the data, this should be enough to get you there.


Update:

As answer to comment.

No time for a complete answer, but some (more) general information that should help you.

Firstly, do not use query_posts see:

for the why.

Secondly, independent from how you will retrieve your list, you generally already have the $post_id's of the single staff posts available. You pretty much just have to make use of this information to make your update_post_meta call address the single posts, instead of the page. A little bit of code refactoring will be necessary, but it should generally be not overly hard to do.

Thirdly and lastly, there are a couple of good plug-ins available which are enabling post sorting via jQuery sortable and saving the data on per post basis. As mentioned above this mostly concerns the menu_order column, but you definitely should take a look at how they do it, because it will be pretty much the same for you, with the only difference that you are going to save your data to post meta fields. So get some inspiration from how it has already be done.

Again, I hope it helps and good luck achieving what you want.

3 added 1473 characters in body
source | link

Short, a new database table would be an absolute overkill.

I think, what you want to do is pretty much resembling the existing menu_order column in wp_posts. Using post meta is just fine, but add it on the the singular staff member posts from your custom post type. So you will have several custom order metas saved for them. And then retrieve the posts (staff members) with WP_Query on the different pages by category and add a meta_query according to the sort order meta field you want, last but not least order your query after the meta field, which means you will likely orderby you meta_value_num. Pretty much all the information you need you get on the WP_Query codex page.

Very brief outline, I hope it helps anyway, but as you are comfortable with saving the data, this should be enough to get you there.


Update:

As answer to comment.

No time for a complete answer, but some (more) general information that should help you.

Firstly, do not use query_posts see:

for the why.

Secondly, independent from how you will retrieve your list, you generally already have the $post_id's of the single staff posts available. You pretty much just have to make use of this information to make your update_post_meta call address the single posts, instead of the page. A little bit of code refactoring will be necessary, but it should generally be not overly hard to do.

Thirdly and lastly, there are a couple of good plug-ins available which are enabling post sorting via jQuery sortable and saving the data on per post basis. As mentioned above this mostly concerns the menu_order column, but you definitely should take a look at how they do it, because it will be pretty much the same for you, with the only difference that you are going to save your data to post meta fields. So get some inspiration from how it has already be done.

Again, I hope it helps and good luck achieving what you want.

Short, a new database table would be an absolute overkill.

I think, what you want to do is pretty much resembling the existing menu_order column in wp_posts. Using post meta is just fine, but add it on the the singular staff member posts from your custom post type. So you will have several custom order metas saved for them. And then retrieve the posts (staff members) with WP_Query on the different pages by category and add a meta_query according to the sort order meta field you want, last but not least order your query after the meta field, which means you will likely orderby you meta_value_num. Pretty much all the information you need you get on the WP_Query codex page.

Very brief outline, I hope it helps anyway, but as you are comfortable with saving the data, this should be enough to get you there.

Short, a new database table would be an absolute overkill.

I think, what you want to do is pretty much resembling the existing menu_order column in wp_posts. Using post meta is just fine, but add it on the the singular staff member posts from your custom post type. So you will have several custom order metas saved for them. And then retrieve the posts (staff members) with WP_Query on the different pages by category and add a meta_query according to the sort order meta field you want, last but not least order your query after the meta field, which means you will likely orderby you meta_value_num. Pretty much all the information you need you get on the WP_Query codex page.

Very brief outline, I hope it helps anyway, but as you are comfortable with saving the data, this should be enough to get you there.


Update:

As answer to comment.

No time for a complete answer, but some (more) general information that should help you.

Firstly, do not use query_posts see:

for the why.

Secondly, independent from how you will retrieve your list, you generally already have the $post_id's of the single staff posts available. You pretty much just have to make use of this information to make your update_post_meta call address the single posts, instead of the page. A little bit of code refactoring will be necessary, but it should generally be not overly hard to do.

Thirdly and lastly, there are a couple of good plug-ins available which are enabling post sorting via jQuery sortable and saving the data on per post basis. As mentioned above this mostly concerns the menu_order column, but you definitely should take a look at how they do it, because it will be pretty much the same for you, with the only difference that you are going to save your data to post meta fields. So get some inspiration from how it has already be done.

Again, I hope it helps and good luck achieving what you want.

2 added 295 characters in body
source | link

Short, a new database table would be an absolute overkill.

I think, what you want to do is pretty much resembling the existing menu_order column in wp_posts. Using post meta is just fine, but add it on the the singular staff member posts from your custom post type. So you will have several custom order metas saved for them. And then retrieve the posts (staff members) with WP_Query on the different pages by category and add a meta_query according to the sort order meta field you want, last but not least order your query after the meta field, which means you will likely orderby you meta_value_num. Pretty much all the information you need you get on the WP_Query codex page.

Very brief outline, but I hope it helps anyway, but as you are comfortable with saving the data, this should be enough to get you there.

Short, a new database table would be an absolute overkill.

I think, what you want to do is pretty much resembling the existing menu_order column in wp_posts. Using post meta is just fine, but add it on the the singular staff member posts from your custom post type. So you will have several custom order metas saved for them. And then retrieve the posts (staff members) on the different pages by category and add a meta_query according to the sort order meta field you want, last but not least order your query after the meta field.

Very brief outline, but I hope it helps anyway.

Short, a new database table would be an absolute overkill.

I think, what you want to do is pretty much resembling the existing menu_order column in wp_posts. Using post meta is just fine, but add it on the the singular staff member posts from your custom post type. So you will have several custom order metas saved for them. And then retrieve the posts (staff members) with WP_Query on the different pages by category and add a meta_query according to the sort order meta field you want, last but not least order your query after the meta field, which means you will likely orderby you meta_value_num. Pretty much all the information you need you get on the WP_Query codex page.

Very brief outline, I hope it helps anyway, but as you are comfortable with saving the data, this should be enough to get you there.

1
source | link