Support » Plugin: Admin Columns » Support for wp-types post relationships

  • Resolved Mikkel Breum


    I’m using wp-types to create parent-child relationships between custom post types. I’d like to be able to show these in a column. I’d like to be able to choose between displaying the Title or an active (clickable) link to the parent of a given entry.

    Alternatively – if this is outside of your development scope – I’d like to be able to add a cloumn for a custom field that is hidden (fields where the name starts with an underscore).. Could this be implementet?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Mikkel Breum


    The parent relationship for a child post is stored using the _variable_ field name _wpcf_belongs_[CPTSLUG]_id where [CPTSLUG] is the slug of the CPT that the parent relationship regards (a CPT can have multiple parents, one parent for each CPT), so if a post has a parent of type authors (authors being the slug of the parent CPT), the relationship would be stored in the field named _wpcf_belongs_authors_id

    The field would hold the post ID.

    Plugin Author Tobias Schutter


    To enable Hidden custom field you only need to add this line of code to your themes functions.php:

    add_filter('cpac_use_hidden_custom_fields', '__return_true'); // enables the use hidden custom fields

    More cool stuff in the FAQ section of the plugin.

    Thanks, that was very useful.

    Hey Mikkel, did you find a way to display the parent post’s title in the column instead of its ID?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Support for wp-types post relationships’ is closed to new replies.