Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
07/23/2018 at 5:02 pm #468191paul wagnerParticipant
Has there been any development for displaying custom fields on cMap? I’ve added spouse, Terms of Office, and Elks Titles and I found this older article:
but was wondering if there have been an easier way to display these fields.07/23/2018 at 5:17 pm #468192paul wagnerParticipant
I found the include Custom Fields in the display and that works:
Why doesn’t the standard title show up?
…and can I rename Custom fields to Others?07/23/2018 at 6:56 pm #468194Steven ZahmKeymaster
RE: Has there been any development for displaying custom fields on cMap?
The display of a custom text field is covered in this developer doc. The relevant bit is about halfway through covering how to edit the template file.
This method can be utilized in any of the templates, not just cMap.
RE: was wondering if there have been an easier way to display these fields.
Sorry, no, the display has to be added thru code.
RE: I found the include Custom Fields in the display and that works:
That would only work if you deactivate the code which registered the custom field. To ensure you do not lose data, make sure you code is still running.
The “Custom Fields” metabox is not the same as a “custom field” (even though the data is self is saved in the same place in the database. Sorry if that is confusing but the terminology and functionality originate with WordPress itself. Here is an example which may help… Add a new WordPress Page or Post. Scroll to to the bottom, unless you’ve turned it off in the Screen Options you will find a Custom Fields metabox. This is the same feature in which Connections mimics with its “Custom Fields” metabox. One the WordPress add new page/post you will like find all sorts of other “custom fields” added by other plugins and/or the theme which control and/or change the displayed content for the page or post. It is these “custom fields” which you are adding when you register a custom field in Connections. If you were to disable the theme or plugin which has registered their “custom fields”, the data would display in the “Custom Fields” metabox so the data is not lost on page/post edits. Connections mimics this too.
I hope that help clarify and not causes further confusion!!!
RE: Why doesn’t the standard title show up?
When you register a custom text field? If yes, the title option is the title of the custom field metabox in the admin. If you want a label on the template you add it to the code. eg.
$text = $entry->getMeta( array( 'key' => 'field_id', // This should match exactly the field id used when registering the custom field. 'single' => TRUE // Do not change this. ) ); if ( ! empty( $text ) ) echo '<p>LABEL: ' . esc_html( $text ) . '</p>';
Notice I added
RE: can I rename Custom fields to Others?
I’m sorry, but I am not sure what you are asking. Could you give more details?
You cannot reply to this support topic. Please open your own support topic.