Skip to main content
24 events
when toggle format what by license comment
Aug 10, 2017 at 21:11 comment added rinogo For anyone who is just trying to reorder meta boxes, this answer is no longer the best approach. See Nabil's answer.
Sep 12, 2010 at 16:38 comment added NetConstructor.com one more example please.Lets say that you have 5 custom post types. Now, lets assume that for post_type1 you want to set the value to 5 posts, post_type2 set to a value of 2 posts and you want any other ones set to a default value of 10. Could you show what this code would look like? Also, is there an option one could set so that these are just default values unless the user set the value manually himself. If so then how could be force a value so the user can not change it? Finally, when you select "screen options" that value does not update/reflect the value which is actually being displayed.
Sep 12, 2010 at 12:24 comment added sorich87 I added new examples.
Sep 12, 2010 at 12:06 history edited sorich87 CC BY-SA 2.5
added 738 characters in body
Sep 10, 2010 at 8:48 vote accept NetConstructor.com
Sep 10, 2010 at 6:48 comment added NetConstructor.com @sorich87 could you possibly provide an example of setting the values for just two custom post types. Maybe I am doing something wrong
Sep 8, 2010 at 22:49 comment added NetConstructor.com @sorich87 also... how would I set the options just for one specific post type without effecting the other ones?
Sep 8, 2010 at 22:49 comment added NetConstructor.com @sorich87 your code does work but now if a user changes the screen options to show a different value the page only shows the value entered through the functions file. what I was looking for is a way to set the default options however if the user change the screen options manually it would show the user set option.
Sep 7, 2010 at 12:59 comment added sorich87 Sorry, there was an error in the code. I modified it. You will notice the $post_type parameter which allows you to target a specific post type.
Sep 7, 2010 at 12:53 history edited sorich87 CC BY-SA 2.5
deleted 39 characters in body
Sep 7, 2010 at 12:28 history edited sorich87 CC BY-SA 2.5
deleted 2 characters in body
Sep 7, 2010 at 11:26 comment added NetConstructor.com Thank you for your response. I just attempted to utilize the code you provided for setting the default number of posts in the admin post list however this did not seem to be working. Does something specific need to be done if you are trying to change the default number of results for a specific post type? If so, there is a way to set it for all post list pages?
Sep 7, 2010 at 7:17 comment added sorich87 I modified my answer.
Sep 7, 2010 at 7:16 history edited sorich87 CC BY-SA 2.5
added 394 characters in body
Sep 7, 2010 at 6:31 history edited sorich87 CC BY-SA 2.5
added 764 characters in body
Sep 7, 2010 at 4:41 comment added NetConstructor.com @sorich87 thank you for your response however from what I remember there was no way to specific the exact order of each metabox or was there? Maybe I should be a bit more specific. I am basically looking for various code snippets which let me pre-set various options for all users without having to login to each account. Examples: setting the exact order of meta boxes on post edit pages, setting which columns title show up on the post list page, setting the default results to be shown on the post list page... things like that. Thanks in advance.
Sep 6, 2010 at 8:42 history edited sorich87 CC BY-SA 2.5
added 86 characters in body
Sep 6, 2010 at 8:41 comment added sorich87 I modified my answer. Let me know if you need more details.
Sep 6, 2010 at 8:32 history edited sorich87 CC BY-SA 2.5
added 166 characters in body
Sep 6, 2010 at 8:21 history edited sorich87 CC BY-SA 2.5
deleted 1330 characters in body; added 175 characters in body
Sep 6, 2010 at 8:18 comment added Tom J Nowell so technically this is not a question, it is really 2 questions?
Sep 6, 2010 at 8:13 history edited sorich87 CC BY-SA 2.5
added 443 characters in body
Sep 6, 2010 at 8:13 comment added NetConstructor.com Sorry, maybe i did not explain myself correctly. I was referring to the meta boxes on the post edit page in the admin area as well as setting the default number of posts to display on the admin post list page.
Sep 6, 2010 at 8:02 history answered sorich87 CC BY-SA 2.5