0

Registered a custom post type (xyz) and after that added a meta box using this excellent Tuts+ tutorial, so then I can reduce the usage of 'Advanced Custom Fields' where I can (but I love ACF most). But doing so, I came up with some questions:

  1. What is the difference between 'high' and 'core' in the $priority parameter?
  2. How the 'normal' and the 'advanced' are different from each other in the $context parameter?
  3. However I added a meta box it showed a Standard meta box with sortable field-group. How can I achieve an Embedded-like meta box (as how ACF provides with 'Seamless') so then the field-group embeds on the body and user can't sort 'em as their wish? Is that only a CSS issue?
  4. If I think to provide boolean false to 'supports' parameter when registering custom post type (CPT) and make meta box with meta fields to the post type to get the data - is that good for all causes - whether a data hierarchy, SEO, and so on?

EDIT

I'm well aware about the Codex, and already tried the codex things here. On #1 & #2, I can't figure out how they are modifying my meta box due to their value changes. #3 is custom demand, seeking, but till couldn't find it. #4 is a general query, need your advice on experience.

2 Answers 2

1

To answer #3, just search ACF's input.css file for the class no-box and you'll see how it works. If you view the meta box in the context of the edit screen, and delete the no-box class using your browser's web inspector, you'll see that it will appear as and can be sorted like a normal meta box, so it is entirely CSS that does this.

The important bit is to hide the meta box title h3, which is the element that makes it draggable.

.acf_postbox.no_box > h3,
.acf_postbox.no_box > .handlediv {
    display: none;
}

The rest is just styling to remove the background, border, and adjust margin/padding.

0

The codex of WordPress is not perfectly, but often you find a documentation to the functions. see this codex page for the function add_meta_box()

  1. The priority within the context where the boxes should show ('high', 'core', 'default' or 'low') Default: 'default' This is the order of the meta boxes on default, without reorder from the users. The boxes with the high param is on top and so on.

  2. The part of the page where the edit screen section should be shown ('normal', 'advanced', or 'side'). This are different areas on the back end page. The most page, liek edit post, have normal as big area, like editor, the side area, on the right side and the advanced area, below the editor.

  3. If you include only via default function add_meta_box, than is it possible to reorder the position of the meta box for each user. It is no doing on your side. But if you mean, that users can reorder fields inside a meta box, then is a custom script necessary.

  4. Supports Parameter is an alias for calling add_post_type_support() directly. As of 3.5, boolean false can be passed as value instead of an array to prevent default (title and editor) behavior. This param create the view, which meta box and his data is possible to maintain, edit on the CPT. SEO is not a part of the meta boxes on default. At first is SEO a content topic. Meta boxes store data, create different views to different data. I can't write, if this good for all causes. It give so much causes.

3
  • I wish I'd put a -1 to the answer, because, (1) I'm well-aware about the Codex, and already checked there, and not satisfied; (2) I know Codex is 'my' duty to enrich, so after the codex, I tried all the code in real action, and found no huge difference there, so #1 & #2 is to clarify the pinpoint purpose; (3) Your answer #3 is vague to me. I's asking for a special feature, if possible; (4) As I understood, your answer #4 is not even closer to my question. But because you are my senior, and I respect my seniors. I'm sorry. Jun 27, 2014 at 15:46
  • Forgive me, I edited my question to clear the context more. Jun 27, 2014 at 15:52
  • You edit on the question is helpful; all users think, you don't read the codex. I enhance the answer, maybe is help you.
    – bueltge
    Jun 27, 2014 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.