Misc

Adding Fields After the Title

Adding FM fields between the title and the main content editor is a fairly simple process that can be broken down into three basic steps: Render the meta boxes to appear in some uniquely defined context–(uniquely defined context as in not ‘normal’, ‘side’, or ‘advanced’). Here,’my_after_title’ is used. unset the unique context from $wp_meta_boxes[‘post’]. Set the […]

Many-to-Many Relationships

Fieldmanager can assist you in creating many-to-many relationships between posts using the $reciprocal property of Fieldmanager_Datasource_Post and the $serialize_data property of Fieldmanager_Field. Note that this only works using Fieldmanager_Datasource_Post and Fieldmanager_Datasource_User as of this writing. Support for Fieldmanager_Datasource_Term is outstanding.

Storing Data Unserialized

Overview By default, grouped or repeating fields store their data as serialized PHP in a single meta entry. This method favors data retrieval, but has two main drawbacks: (1) it couples data structure and presentation, and (2) it’s difficult to query against (e.g. using a meta query). Therefore, there may be cases where you don’t […]